1234
}
1235
1237
>
// TODO: Remove this special handling for zombie workflow.
1238
>
// This method should not be called for zombie workflow as it's not considered closed (though it's not running either).
1239
>
//
1240
>
// However, most callers in this codebase simply check if workflowIsRunning before calling this method, so we cloud reach here
1241
>
// even if the workflow is zombie.
1242
>
// Most callers are in task executor logic, and we should just prevent any task executor from running when workflow is in zombie state.
1243
>
if ms.executionState.State == enumsspb.WORKFLOW_EXECUTION_STATE_ZOMBIE {
1244
return ms.GetLastWriteVersion()
1245
}