Example #1
0
        /// <summary>
        /// Returns true if the given execution is in a compensation-throwing activity but there is no dedicated scope execution
        /// in the given mapping.
        /// </summary>
        public static bool isCompensationThrowing(PvmExecutionImpl execution, IDictionary <ScopeImpl, PvmExecutionImpl> activityExecutionMapping)
        {
            if (CompensationBehavior.isCompensationThrowing(execution))
            {
                ScopeImpl compensationThrowingActivity = execution.getActivity();

                if (compensationThrowingActivity.Scope)
                {
                    return(activityExecutionMapping[compensationThrowingActivity] == activityExecutionMapping[compensationThrowingActivity.FlowScope]);
                }
                else
                {
                    // for transaction sub processes with cancel end events, the compensation throwing execution waits in the boundary event, not in the end
                    // event; cancel boundary events are currently not scope
                    return(compensationThrowingActivity.ActivityBehavior is CancelBoundaryEventActivityBehavior);
                }
            }
            else
            {
                return(false);
            }
        }
Example #2
0
 public bool isFulfilled(PvmExecutionImpl element)
 {
     return(element == null || CompensationBehavior.isCompensationThrowing(element));
 }
Example #3
0
 /// <summary>
 /// <para>In general, only leaf executions have activity ids.</para>
 /// <para>Exception to that rule: compensation throwing executions.</para>
 /// <para>Legacy exception (<= 7.2) to that rule: miBody executions and parallel gateway executions</para>
 /// </summary>
 /// <returns> true, if the argument is not a leaf and has an invalid (i.e. legacy) non-null activity id </returns>
 public static bool hasInvalidIntermediaryActivityId(PvmExecutionImpl execution)
 {
     return(execution.NonEventScopeExecutions.Count > 0 && !CompensationBehavior.isCompensationThrowing(execution));
 }