public virtual void attachState(MigratingScopeInstance owningInstance) { ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution(); representativeExecution.addExternalTask(externalTask); externalTask.Execution = representativeExecution; }