Beispiel #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 = (ScopeImpl)execution.Activity;

                if (compensationThrowingActivity.IsScope)
                {
                    return(activityExecutionMapping[compensationThrowingActivity] ==
                           activityExecutionMapping[compensationThrowingActivity.FlowScope]);
                }
                return(compensationThrowingActivity.ActivityBehavior is CancelBoundaryEventActivityBehavior);
            }
            return(false);
        }
Beispiel #2
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));
 }