Exemple #1
0
        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);
        }
Exemple #2
0
 public virtual void concurrentChildExecutionEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution)
 {
     endedExecution.remove();
     scopeExecution.tryPruneLastConcurrentChild();
 }