Class CatchEventBehavior
java.lang.Object
io.camunda.zeebe.engine.processing.common.CatchEventBehavior
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCatchEventBehavior
(ProcessingState processingState, KeyGenerator keyGenerator, ExpressionProcessor expressionProcessor, SubscriptionCommandSender subscriptionCommandSender, StateWriter stateWriter, SideEffectWriter sideEffectWriter, DueDateTimerChecker timerChecker, int partitionsCount) -
Method Summary
Modifier and TypeMethodDescriptionsubscribeToEvents
(BpmnElementContext context, ExecutableCatchEventSupplier supplier) Subscribes to all events of the given supplier.subscribeToEvents
(BpmnElementContext context, ExecutableCatchEventSupplier supplier, Predicate<CatchEventBehavior.CatchEvent> filter) Subscribes to all events of the given supplier that match the given catch event id filter.void
subscribeToTimerEvent
(long elementInstanceKey, long processInstanceKey, long processDefinitionKey, org.agrona.DirectBuffer handlerNodeId, String tenantId, Timer timer) void
Unsubscribe from all event subprocesses in the scope of the element instance.void
unsubscribeFromEvents
(long elementInstanceKey) Unsubscribe from all events in the scope of the element instance.void
unsubscribeFromMessageEvents
(long elementInstanceKey, Predicate<ProcessMessageSubscription> filter) void
-
Constructor Details
-
CatchEventBehavior
public CatchEventBehavior(ProcessingState processingState, KeyGenerator keyGenerator, ExpressionProcessor expressionProcessor, SubscriptionCommandSender subscriptionCommandSender, StateWriter stateWriter, SideEffectWriter sideEffectWriter, DueDateTimerChecker timerChecker, int partitionsCount)
-
-
Method Details
-
unsubscribeFromEvents
public void unsubscribeFromEvents(long elementInstanceKey) Unsubscribe from all events in the scope of the element instance.- Parameters:
elementInstanceKey
- the element instance key to subscript from
-
unsubscribeEventSubprocesses
Unsubscribe from all event subprocesses in the scope of the element instance. Ignores other event subscriptions in the scope.- Parameters:
context
- the context to subscript from
-
subscribeToEvents
public Either<Failure,Void> subscribeToEvents(BpmnElementContext context, ExecutableCatchEventSupplier supplier) Subscribes to all events of the given supplier.- Parameters:
context
- the context of the element instance that subscribes to eventssupplier
- the supplier of catch events to subscribe to, typically the element of the element instance that subscribes to events- Returns:
- either a failure or nothing
-
subscribeToEvents
public Either<Failure,Void> subscribeToEvents(BpmnElementContext context, ExecutableCatchEventSupplier supplier, Predicate<CatchEventBehavior.CatchEvent> filter) Subscribes to all events of the given supplier that match the given catch event id filter.Note that the filter provides access to the catch event as well as the result of evaluating its expressions. This allows for more complex filters that depend on both the catch event and the result of evaluating its expressions.
- Parameters:
context
- the context of the element instance that subscribes to eventssupplier
- the supplier of catch events to subscribe to, typically the element of the element instance that subscribes to eventsfilter
- the filter for catch events to subscribe to, only events that match the filter are subscribed to.- Returns:
- either a failure or nothing
-
subscribeToTimerEvent
-
unsubscribeFromTimerEvent
-
unsubscribeFromMessageEvents
public void unsubscribeFromMessageEvents(long elementInstanceKey, Predicate<ProcessMessageSubscription> filter)
-