public override void destroyInnerInstance(ActivityExecution concurrentExecution) { ActivityExecution scopeExecution = concurrentExecution.Parent; concurrentExecution.remove(); scopeExecution.forceUpdate(); int nrOfActiveInstances = getLoopVariable(scopeExecution, NUMBER_OF_ACTIVE_INSTANCES).Value; setLoopVariable(scopeExecution, NUMBER_OF_ACTIVE_INSTANCES, nrOfActiveInstances - 1); }
protected internal virtual void signalCompensationDone(ActivityExecution execution) { // default behavior is to join compensating executions and propagate the signal if all executions have compensated // only wait for non-event-scope executions cause a compensation event subprocess consume the compensation event and // do not have to compensate embedded subprocesses (which are still non-event-scope executions) if (((PvmExecutionImpl)execution).NonEventScopeExecutions.Count == 0) { if (execution.Parent != null) { ActivityExecution parent = execution.Parent; execution.remove(); parent.signal(SIGNAL_COMPENSATION_DONE, null); } } else { ((ExecutionEntity)execution).forceUpdate(); } }
public static bool eventSubprocessConcurrentChildExecutionEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution) { bool performLegacyBehavior = isLegacyBehaviorRequired(endedExecution); if (performLegacyBehavior) { LOG.endConcurrentExecutionInEventSubprocess(); // notify the grandparent flow scope in a similar way PvmAtomicOperationAcitivtyEnd does ScopeImpl flowScope = endedExecution.Activity.FlowScope; if (flowScope != null) { flowScope = flowScope.FlowScope; if (flowScope != null) { if (flowScope == endedExecution.Activity.ProcessDefinition) { endedExecution.remove(); scopeExecution.tryPruneLastConcurrentChild(); scopeExecution.forceUpdate(); } else { PvmActivity flowScopeActivity = (PvmActivity)flowScope; ActivityBehavior activityBehavior = flowScopeActivity.ActivityBehavior; if (activityBehavior is CompositeActivityBehavior) { ((CompositeActivityBehavior)activityBehavior).concurrentChildExecutionEnded(scopeExecution, endedExecution); } } } } } return(performLegacyBehavior); }
public virtual void concurrentChildExecutionEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution) { endedExecution.remove(); scopeExecution.tryPruneLastConcurrentChild(); }