41
}
42
43
>
var attemptStartedTime time.Time
api.go
44
>
var firstScheduledTime time.Time
45
>
var taskQueue string
46
>
var workflowTypeName string
47
>
var versioningBehavior enumspb.VersioningBehavior
48
>
err = api.GetAndUpdateWorkflowWithNew(
49
>
ctx,
50
>
token.Clock,
51
>
definition.NewWorkflowKey(
52
>
token.NamespaceId,
53
>
token.WorkflowId,
54
>
token.RunId,
55
>
),
56
>
func(workflowLease api.WorkflowLease) (*api.UpdateWorkflowAction, error) {
57
>
mutableState := workflowLease.GetMutableState()
58
>
workflowTypeName = mutableState.GetWorkflowType().GetName()
59
>
if !mutableState.IsWorkflowExecutionRunning() {
60
return nil, consts.ErrWorkflowCompleted
61
}
62
63
>
scheduledEventID := token.GetScheduledEventId()
api.go
64
>
if scheduledEventID == common.EmptyEventID { // client call CompleteActivityById, so get scheduledEventID by activityID
65
scheduledEventID, err0 = api.GetActivityScheduledEventID(token.GetActivityId(), mutableState)
66
if err0 != nil {