Class ProcessInstanceStateTransitionGuard

java.lang.Object
io.camunda.zeebe.engine.processing.bpmn.ProcessInstanceStateTransitionGuard

public final class ProcessInstanceStateTransitionGuard extends Object
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 Details

    • ProcessInstanceStateTransitionGuard

      public ProcessInstanceStateTransitionGuard(BpmnStateBehavior stateBehavior)
  • Method Details

    • isValidStateTransition

      public Either<Failure,?> isValidStateTransition(BpmnElementContext context, ExecutableFlowElement element)
      Checks if the preconditions of the given command are met.
      Returns:
      true if the preconditions are met and the transition command is valid.