(ref: WorkflowRunReference)
| 164 | } |
| 165 | |
| 166 | async describeWorkflow(ref: WorkflowRunReference): Promise<WorkflowRunStatus> { |
| 167 | const handle = await this.getWorkflowHandle(ref); |
| 168 | this.logger.log(`Describing workflow ${handle.workflowId} (runId=${ref.runId ?? 'latest'})`); |
| 169 | const description = await handle.describe(); |
| 170 | return { |
| 171 | workflowId: description.workflowId, |
| 172 | runId: description.runId, |
| 173 | status: description.status.name, |
| 174 | startTime: description.startTime.toISOString(), |
| 175 | closeTime: description.closeTime?.toISOString(), |
| 176 | historyLength: description.historyLength, |
| 177 | taskQueue: description.taskQueue, |
| 178 | failure: (description.status as any)?.failure, |
| 179 | }; |
| 180 | } |
| 181 | |
| 182 | async getWorkflowResult(ref: WorkflowRunReference) { |
| 183 | const handle = await this.getWorkflowHandle(ref); |
no test coverage detected