Class 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 Detail

      • ProcessInstanceStateTransitionGuard

        public ProcessInstanceStateTransitionGuard​(BpmnStateBehavior stateBehavior)
    • Method Detail

      • isValidStateTransition

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