Class FaultPropagation

java.lang.Object
org.flowable.cmmn.engine.impl.util.FaultPropagation

public class FaultPropagation extends Object
Handles propagation of a BusinessError during CMMN plan item execution.
  1. Check if any plan item in the case has a fault sentry on the faulting task (in a catchable state)
  2. If found: fail the task, sentries fire naturally via the standard sentry evaluation. Done.
  3. If not found: propagate to parent engine via callback (async) or re-throw (synchronous/no parent)
This respects CMMN semantics — sentries can reference plan items across stages, so there is no need to walk the stage hierarchy level by level.
Author:
Joram Barrez
  • Constructor Details

    • FaultPropagation

      public FaultPropagation()
  • Method Details

    • propagateFault

      public static void propagateFault(BusinessError fault, CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity)
    • isFaultCaught

      public static boolean isFaultCaught(PlanItemInstanceEntity faultedPlanItemInstance)
      Checks if any plan item in the case has a fault sentry referencing the faulting plan item, using the parser-built dependency graph (PlanItem.getEntryDependentPlanItems()). Also verifies that at least one runtime instance of the dependent plan item is in a catchable state (AVAILABLE or WAITING_FOR_REPETITION).