Class CompensationUtil
java.lang.Object
org.operaton.bpm.engine.impl.bpmn.helper.CompensationUtil
- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringname of the signal that is thrown when a compensation handler completed -
Method Summary
Modifier and TypeMethodDescriptionstatic List<EventSubscriptionEntity> collectCompensateEventSubscriptionsForActivity(ActivityExecution execution, String activityRef) Collect all compensate event subscriptions for activity on the scope of given execution.static List<EventSubscriptionEntity> Collect all compensate event subscriptions for scope of given execution.static voidcreateEventScopeExecution(ExecutionEntity execution) creates an event scope for the given execution:static ExecutionEntitygetCompensatingExecution(EventSubscriptionEntity eventSubscription) protected static ActivityImplgetEventScopeCompensationHandler(ExecutionEntity execution) In the context when an event scope execution is created (i.e. a scope such as a subprocess has completed), this method returns the compensation handler activity that is going to be executed when by the event scope execution.protected static booleanhasCompensationEventSubprocess(ActivityImpl activity) static voidthrowCompensationEvent(List<EventSubscriptionEntity> eventSubscriptions, ActivityExecution execution, boolean async) we create a separate execution for each compensation handler invocation.
-
Field Details
-
SIGNAL_COMPENSATION_DONE
name of the signal that is thrown when a compensation handler completed- See Also:
-
-
Method Details
-
throwCompensationEvent
public static void throwCompensationEvent(List<EventSubscriptionEntity> eventSubscriptions, ActivityExecution execution, boolean async) we create a separate execution for each compensation handler invocation. -
createEventScopeExecution
creates an event scope for the given execution:create a new event scope execution under the parent of the given execution and move all event subscriptions to that execution.
this allows us to "remember" the event subscriptions after finishing a scope
-
hasCompensationEventSubprocess
-
getEventScopeCompensationHandler
In the context when an event scope execution is created (i.e. a scope such as a subprocess has completed), this method returns the compensation handler activity that is going to be executed when by the event scope execution.This method is not relevant when the scope has a boundary compensation handler.
-
collectCompensateEventSubscriptionsForScope
public static List<EventSubscriptionEntity> collectCompensateEventSubscriptionsForScope(ActivityExecution execution) Collect all compensate event subscriptions for scope of given execution. -
collectCompensateEventSubscriptionsForActivity
public static List<EventSubscriptionEntity> collectCompensateEventSubscriptionsForActivity(ActivityExecution execution, String activityRef) Collect all compensate event subscriptions for activity on the scope of given execution. -
getCompensatingExecution
-