Class InvalidStateException

All Implemented Interfaces:
Serializable

public class InvalidStateException extends WorkflowException
Exception thrown when an invalid state is encountered during workflow execution. InvalidStateException is used to indicate that a workflow instance is in an unexpected or invalid state for the requested operation.

This exception is typically thrown when attempting to perform operations on a workflow instance that are not valid for its current state, such as trying to transition from a completed state or accessing a state that doesn't exist in the workflow definition.

The exception includes the StateId that caused the error, allowing for detailed error reporting and debugging.

Since:
1.0
See Also:
  • Constructor Details

    • InvalidStateException

      public InvalidStateException(StateId stateId)
      Creates a new InvalidStateException with the specified StateId.
      Parameters:
      stateId - the invalid state ID that caused the exception
  • Method Details

    • getStateId

      public StateId getStateId()
      Returns the StateId that caused the exception.
      Returns:
      the invalid state ID
    • getMessage

      public String getMessage()
      Returns a detailed error message including the invalid state ID.
      Overrides:
      getMessage in class Throwable
      Returns:
      the error message