diff --git a/service/interpreter/cadence/workflowProvider.go b/service/interpreter/cadence/workflowProvider.go index 86900e68..fb02b7f5 100644 --- a/service/interpreter/cadence/workflowProvider.go +++ b/service/interpreter/cadence/workflowProvider.go @@ -85,7 +85,7 @@ func (w *workflowProvider) GetWorkflowInfo(ctx interpreter.UnifiedContext) inter }, WorkflowStartTime: time.UnixMilli(0), // TODO need support from Cadence client: https://github.com/uber-go/cadence-client/issues/1204 WorkflowExecutionTimeout: time.Duration(info.ExecutionStartToCloseTimeoutSeconds) * time.Second, - FirstRunID: "", // Cadence does not provide FirstRunID + FirstRunID: info.WorkflowExecution.RunID, // Cadence does not provide FirstRunID TODO https://github.com/uber-go/cadence-client/issues/1371 use firstRunID when available } } diff --git a/service/interpreter/workflowImpl.go b/service/interpreter/workflowImpl.go index ff85e667..1e02c0b0 100644 --- a/service/interpreter/workflowImpl.go +++ b/service/interpreter/workflowImpl.go @@ -461,10 +461,10 @@ func executeState( executeApi = StateApiExecute } - info := provider.GetWorkflowInfo(ctx) // TODO use firstRunId instead + info := provider.GetWorkflowInfo(ctx) executionContext := iwfidl.Context{ WorkflowId: info.WorkflowExecution.ID, - WorkflowRunId: info.WorkflowExecution.RunID, + WorkflowRunId: info.FirstRunID, WorkflowStartedTimestamp: info.WorkflowStartTime.Unix(), StateExecutionId: &stateExeId, }