Class CompensationUtil
- java.lang.Object
-
- org.camunda.bpm.engine.impl.bpmn.helper.CompensationUtil
-
public class CompensationUtil extends java.lang.Object
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SIGNAL_COMPENSATION_DONE
name of the signal that is thrown when a compensation handler completed
-
Constructor Summary
Constructors Constructor Description CompensationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<EventSubscriptionEntity>
collectCompensateEventSubscriptionsForActivity(ActivityExecution execution, java.lang.String activityRef)
Collect all compensate event subscriptions for activity on the scope of given execution.static java.util.List<EventSubscriptionEntity>
collectCompensateEventSubscriptionsForScope(ActivityExecution execution)
Collect all compensate event subscriptions for scope of given execution.static void
createEventScopeExecution(ExecutionEntity execution)
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.static ExecutionEntity
getCompensatingExecution(EventSubscriptionEntity eventSubscription)
protected static ActivityImpl
getEventScopeCompensationHandler(ExecutionEntity execution)
In the context when an event scope execution is created (i.e.protected static boolean
hasCompensationEventSubprocess(ActivityImpl activity)
static void
throwCompensationEvent(java.util.List<EventSubscriptionEntity> eventSubscriptions, ActivityExecution execution, boolean async)
we create a separate execution for each compensation handler invocation.
-
-
-
Field Detail
-
SIGNAL_COMPENSATION_DONE
public static final java.lang.String SIGNAL_COMPENSATION_DONE
name of the signal that is thrown when a compensation handler completed- See Also:
- Constant Field Values
-
-
Method Detail
-
throwCompensationEvent
public static void throwCompensationEvent(java.util.List<EventSubscriptionEntity> eventSubscriptions, ActivityExecution execution, boolean async)
we create a separate execution for each compensation handler invocation.
-
createEventScopeExecution
public static void createEventScopeExecution(ExecutionEntity execution)
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
protected static boolean hasCompensationEventSubprocess(ActivityImpl activity)
-
getEventScopeCompensationHandler
protected static ActivityImpl getEventScopeCompensationHandler(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. This method is not relevant when the scope has a boundary compensation handler.
-
collectCompensateEventSubscriptionsForScope
public static java.util.List<EventSubscriptionEntity> collectCompensateEventSubscriptionsForScope(ActivityExecution execution)
Collect all compensate event subscriptions for scope of given execution.
-
collectCompensateEventSubscriptionsForActivity
public static java.util.List<EventSubscriptionEntity> collectCompensateEventSubscriptionsForActivity(ActivityExecution execution, java.lang.String activityRef)
Collect all compensate event subscriptions for activity on the scope of given execution.
-
getCompensatingExecution
public static ExecutionEntity getCompensatingExecution(EventSubscriptionEntity eventSubscription)
-
-