Package com.yworkflow.instance.error
Class InvalidWorkflowInstanceStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.yworkflow.common.error.WorkflowException
com.yworkflow.instance.error.InvalidWorkflowInstanceStatusException
- All Implemented Interfaces:
Serializable
Exception thrown when an invalid status transition is attempted on a workflow instance.
InvalidWorkflowInstanceStatusException is used to indicate that a workflow instance cannot
transition from its current status to the requested new status.
This exception is typically thrown when attempting to change the status of a workflow instance in a way that violates the workflow lifecycle rules, such as trying to complete an already completed instance or trying to start an instance that is already running.
The exception includes both the actual current status and the requested new status, allowing for detailed error reporting and debugging.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidWorkflowInstanceStatusException(WorkflowInstanceStatus actualStatus, WorkflowInstanceStatus newStatus) Creates a new InvalidWorkflowInstanceStatusException with the specified statuses. -
Method Summary
Modifier and TypeMethodDescriptionReturns the actual current status of the workflow instance.Returns the requested new status that is invalid.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidWorkflowInstanceStatusException
public InvalidWorkflowInstanceStatusException(WorkflowInstanceStatus actualStatus, WorkflowInstanceStatus newStatus) Creates a new InvalidWorkflowInstanceStatusException with the specified statuses.- Parameters:
actualStatus- the current status of the workflow instancenewStatus- the requested new status that is invalid
-
-
Method Details
-
getActualStatus
Returns the actual current status of the workflow instance.- Returns:
- the current status
-
getNewStatus
Returns the requested new status that is invalid.- Returns:
- the requested new status
-