Example #1
0
        /// <summary>
        /// creates a new execution. properties processDefinition, processInstance and activity will be initialized. </summary>
        public override ExecutionImpl createExecution(bool initializeExecutionStartContext)
        {
            // create the new child execution
            ExecutionImpl createdExecution = newExecution();

            // initialize sequence counter
            createdExecution.SequenceCounter = SequenceCounter;

            // manage the bidirectional parent-child relation
            createdExecution.Parent = this;

            // initialize the new execution
            createdExecution.ProcessDefinition = ProcessDefinition;
            createdExecution.setProcessInstance(getProcessInstance());
            createdExecution.Activity = Activity;

            // make created execution start in same activity instance
            createdExecution.activityInstanceId = activityInstanceId;

            // with the fix of CAM-9249 we presume that the parent and the child have the same startContext
            if (initializeExecutionStartContext)
            {
                createdExecution.StartContext = new ExecutionStartContext();
            }
            else if (startContext != null)
            {
                createdExecution.StartContext = startContext;
            }

            createdExecution.skipCustomListeners = this.skipCustomListeners;
            createdExecution.skipIoMapping       = this.skipIoMapping;

            return(createdExecution);
        }
Example #2
0
 public override void setSuperExecution(PvmExecutionImpl superExecution)
 {
     this.superExecution = (ExecutionImpl)superExecution;
     if (superExecution != null)
     {
         superExecution.SubProcessInstance = null;
     }
 }
Example #3
0
 /// <summary>
 /// for setting the process instance, this setter must be used as subclasses can override </summary>
 public override void setProcessInstance(PvmExecutionImpl processInstance)
 {
     this.processInstance = (ExecutionImpl)processInstance;
 }
Example #4
0
 public override void setSubProcessInstance(PvmExecutionImpl subProcessInstance)
 {
     this.subProcessInstance = (ExecutionImpl)subProcessInstance;
 }