Package com.codingapi.flow.exception
Class FlowStateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.codingapi.flow.exception.FlowException
com.codingapi.flow.exception.FlowStateException
- All Implemented Interfaces:
Serializable
Flow state exception
Thrown when the flow state does not allow the current operation For example: workflow is finished and cannot be operated, record is processed and cannot be processed again, etc.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlowStateException(String code, String message) ConstructorFlowStateException(String code, String message, Throwable cause) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic FlowStateExceptioninvalidStateTransition(String fromState, String toState) Invalid state transitionstatic FlowStateExceptionNode not support revokestatic FlowStateExceptionOperator does not matchstatic FlowStateExceptionRecord is already done, operation not allowedstatic FlowStateExceptionRecord is already todo, operation not allowedstatic FlowStateExceptionRecord not support revokestatic FlowStateExceptionRecord not support urgestatic FlowStateExceptionWorkflow is already finishedstatic FlowStateExceptionWorkflow is already terminatedMethods inherited from class com.codingapi.flow.exception.FlowException
getErrorCode, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
FlowStateException
Constructor- Parameters:
code- error codemessage- error message
-
FlowStateException
Constructor- Parameters:
code- error codemessage- error messagecause- cause
-
-
Method Details
-
recordAlreadyDone
Record is already done, operation not allowed- Returns:
- exception
-
recordAlreadyTodo
Record is already todo, operation not allowed- Returns:
- exception
-
operatorNotMatch
Operator does not match- Returns:
- exception
-
workflowAlreadyFinished
Workflow is already finished- Returns:
- exception
-
workflowAlreadyTerminated
Workflow is already terminated- Returns:
- exception
-
invalidStateTransition
Invalid state transition- Parameters:
fromState- current statetoState- target state- Returns:
- exception
-
recordNotSupportRevoke
Record not support revoke- Returns:
- exception
-
nodeNotSupportRevoke
Node not support revoke- Returns:
- exception
-
recordNotSupportUrge
Record not support urge- Returns:
- exception
-