(ctx context.Context)
| 713 | } |
| 714 | |
| 715 | func (env WorkflowRun) Finished(ctx context.Context) bool { |
| 716 | desc, err := env.c.DescribeWorkflowExecution(ctx, env.GetID(), "") |
| 717 | if err != nil { |
| 718 | return false |
| 719 | } |
| 720 | return desc.GetWorkflowExecutionInfo().GetStatus() != enums.WORKFLOW_EXECUTION_STATUS_RUNNING |
| 721 | } |
| 722 | |
| 723 | func (env WorkflowRun) Error(ctx context.Context) error { |
| 724 | if env.Finished(ctx) { |