Package com.yworkflow.instance.error
Class InvalidStateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.yworkflow.common.error.WorkflowException
com.yworkflow.instance.error.InvalidStateException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionInvalidStateException(StateId stateId) Creates a new InvalidStateException with the specified StateId. -
Method Summary
Modifier and TypeMethodDescriptionReturns a detailed error message including the invalid state ID.Returns the StateId that caused the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidStateException
Creates a new InvalidStateException with the specified StateId.- Parameters:
stateId- the invalid state ID that caused the exception
-
-
Method Details
-
getStateId
Returns the StateId that caused the exception.- Returns:
- the invalid state ID
-
getMessage
Returns a detailed error message including the invalid state ID.- Overrides:
getMessagein classThrowable- Returns:
- the error message
-