4303
4304
if versioningStamp == nil {
4305
>
// We want to add version stamp to the started event being added now with delay. The task may be now completed,
mutable_state_impl.go
4306
>
// failed, cancelled, or timed out. For some cases such as timeout, cancellation, and failed by Resetter we do
4307
>
// not receive a stamp because worker is not involved, therefore, we reconstruct the stamp base on pending
4308
>
// activity data, if versioning is used.
4309
>
// Find the build ID of the worker to whom the task was dispatched base on whether it was an independently-
4310
>
// assigned activity or not.
4311
>
startedBuildId := ai.GetLastIndependentlyAssignedBuildId()
4312
>
if useWf := ai.GetUseWorkflowBuildIdInfo(); useWf != nil {
4313
startedBuildId = useWf.GetLastUsedBuildId()
4314
}
4316
// If a build ID is found, i.e. versioning is used for the activity, set versioning stamp.
4317
versioningStamp = &commonpb.WorkerVersionStamp{UseVersioning: true, BuildId: startedBuildId}