Class BpmnEventPublicationBehavior
- java.lang.Object
-
- io.camunda.zeebe.engine.processing.bpmn.behavior.BpmnEventPublicationBehavior
-
public final class BpmnEventPublicationBehavior extends Object
-
-
Constructor Summary
Constructors Constructor Description BpmnEventPublicationBehavior(MutableZeebeState zeebeState, EventTriggerBehavior eventTriggerBehavior, Writers writers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Either<Failure,CatchEventAnalyzer.CatchEventTuple>
findErrorCatchEvent(org.agrona.DirectBuffer errorCode, BpmnElementContext context)
Finds the right catch event for the given error.void
throwErrorEvent(CatchEventAnalyzer.CatchEventTuple catchEventTuple)
Throws an error event to the given element instance/catch event pair.
-
-
-
Constructor Detail
-
BpmnEventPublicationBehavior
public BpmnEventPublicationBehavior(MutableZeebeState zeebeState, EventTriggerBehavior eventTriggerBehavior, Writers writers)
-
-
Method Detail
-
throwErrorEvent
public void throwErrorEvent(CatchEventAnalyzer.CatchEventTuple catchEventTuple)
Throws an error event to the given element instance/catch event pair. Only throws the event if the given element instance is exists and is accepting events, e.g. isn't terminating, wasn't interrupted, etc.- Parameters:
catchEventTuple
- a tuple representing a catch event and its current instance
-
findErrorCatchEvent
public Either<Failure,CatchEventAnalyzer.CatchEventTuple> findErrorCatchEvent(org.agrona.DirectBuffer errorCode, BpmnElementContext context)
Finds the right catch event for the given error. This is done by going up through the scope hierarchy recursively until a matching catch event is found. If none are found, a failure is returned.The returned
CatchEventAnalyzer.CatchEventTuple
can be used to throw the event viathrowErrorEvent(CatchEventTuple)
.- Parameters:
errorCode
- the error code of the error eventcontext
- the current element context- Returns:
- a valid
CatchEventAnalyzer.CatchEventTuple
if a catch event is found, or a failure otherwise
-
-