Class ProcessInstanceStateTransitionGuard
java.lang.Object
io.camunda.zeebe.engine.processing.bpmn.ProcessInstanceStateTransitionGuard
Checks the preconditions of a state transition command.
A process instance can be have concurrent state transitions if a user command is received (e.g. cancel process instance) or if an internal/external event is triggered (e.g. timer boundary event). In this case, the current process instance processing needs to be interrupted be avoid an inconsistent state.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoesPathExist(ExecutableProcess process, org.agrona.DirectBuffer sourceElementId, org.agrona.DirectBuffer targetElementId, Set<org.agrona.DirectBuffer> visited) Set<org.agrona.DirectBuffer>findActivateElementInFlowScope(BpmnElementContext context, ExecutableFlowElement executableFlowElement) isValidStateTransition(BpmnElementContext context, ExecutableFlowElement element) Checks if the preconditions of the given command are met.
-
Constructor Details
-
ProcessInstanceStateTransitionGuard
-
-
Method Details
-
isValidStateTransition
public Either<Failure,?> isValidStateTransition(BpmnElementContext context, ExecutableFlowElement element) Checks if the preconditions of the given command are met.- Returns:
trueif the preconditions are met and the transition command is valid.
-
findActivateElementInFlowScope
public Set<org.agrona.DirectBuffer> findActivateElementInFlowScope(BpmnElementContext context, ExecutableFlowElement executableFlowElement) -
doesPathExist
public boolean doesPathExist(ExecutableProcess process, org.agrona.DirectBuffer sourceElementId, org.agrona.DirectBuffer targetElementId, Set<org.agrona.DirectBuffer> visited)
-