private void _RunSuccessor(IExecutive exec, object userData) { StepStateMachine ssm = ((object[])userData)[0] as StepStateMachine; PfcExecutionContext parentPfcec = ((object[])userData)[1] as PfcExecutionContext; Debug.Assert(!parentPfcec.IsStepCentric); ssm.Start(parentPfcec);// Must run ones' successor in the context of out parent, not the predecessor step. }
/// <summary> /// Runs this execution engine's PFC. If this is not called by a detachable event, it calls back for a new /// execEvent, on a detachable event controller. /// </summary> /// <param name="exec">The exec.</param> /// <param name="userData">The user data.</param> public void Run(IExecutive exec, object userData) { if (exec.CurrentEventType != ExecEventType.Detachable) { m_model.Executive.RequestEvent( delegate(IExecutive exec1, object userData1) { Run(exec, (IDictionary)userData1); }, exec.Now, exec.CurrentPriorityLevel, userData, ExecEventType.Detachable); } else { // We already got this permission as a part of the permission to start the PFC. //m_startStep.GetStartPermission((IDictionary)userData); m_startStep.Start((PfcExecutionContext)userData); } }