예제 #1
0
 protected internal virtual void Instantiate(IActivityExecution ancestorScopeExecution,
                                             IList <IPvmActivity> parentFlowScopes, CoreModelElement targetElement)
 {
     if (targetElement is IPvmTransition)
     {
         ancestorScopeExecution.ExecuteActivities(parentFlowScopes, null, (IPvmTransition)targetElement,
                                                  variables, variablesLocal, skipCustomListeners, skipIoMappings);
     }
     else if (targetElement is IPvmActivity)
     {
         ancestorScopeExecution.ExecuteActivities(parentFlowScopes, (IPvmActivity)targetElement, null, variables,
                                                  variablesLocal, skipCustomListeners, skipIoMappings);
     }
     else
     {
         throw new ProcessEngineException("Cannot instantiate element " + targetElement);
     }
 }