Class CatchEventBehavior

java.lang.Object
io.camunda.zeebe.engine.processing.common.CatchEventBehavior

public final class CatchEventBehavior extends Object
  • Constructor Details

  • 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

      public void unsubscribeEventSubprocesses(BpmnElementContext context)
      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 events
      supplier - 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<ExecutableCatchEvent> filterBeforeEvaluation, Predicate<CatchEventBehavior.CatchEvent> filterAfterEvaluation)
      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 events
      supplier - the supplier of catch events to subscribe to, typically the element of the element instance that subscribes to events
      filterBeforeEvaluation - the filter for catch events to subscribe to. Only events that match the filter are subscribed to. This filter is applied before evaluating the catch event's expressions. This is especially useful for filtering catch events that doesn't require an expression evaluation.
      filterAfterEvaluation - the filter for catch events to subscribe to. Only events that match the filter are subscribed to. This filter is applied after evaluating the catch event's expressions.
      Returns:
      either a failure or nothing
    • subscribeToTimerEvent

      public void subscribeToTimerEvent(long elementInstanceKey, long processInstanceKey, long processDefinitionKey, org.agrona.DirectBuffer handlerNodeId, String tenantId, Timer timer)
    • unsubscribeFromSignalEventsBySubscriptionFilter

      public void unsubscribeFromSignalEventsBySubscriptionFilter(long elementInstanceKey, Predicate<SignalSubscription> signalSubscriptionFilter)
    • unsubscribeFromSignalEvents

      public void unsubscribeFromSignalEvents(long elementInstanceKey, Predicate<org.agrona.DirectBuffer> elementIdFilter)
    • unsubscribeFromTimerEventsByInstanceFilter

      public void unsubscribeFromTimerEventsByInstanceFilter(long elementInstanceKey, Predicate<TimerInstance> timerInstanceFilter)
    • unsubscribeFromTimerEvent

      public void unsubscribeFromTimerEvent(TimerInstance timer)
    • unsubscribeFromMessageEvents

      public void unsubscribeFromMessageEvents(long elementInstanceKey, Predicate<ProcessMessageSubscription> filter)