ms historyi.MutableState,
accessType hsm.AccessType,
// need to specifically check for zombie workflows here instead of workflow running
// or not since zombie workflows are considered as not running but closed workflow
// can still be updated
if accessType == hsm.AccessWrite &&
ms.GetExecutionState().State == enumsspb.WORKFLOW_EXECUTION_STATE_ZOMBIE {
return consts.ErrWorkflowZombie
}