Class InvalidActivityStateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.aristaflow.adept2.model.execution.InvalidActivityStateException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidRuntimeManagerException
This exception will be raised if an activity (a process step) is not in the
right state to perform a desired state transition. Besides the
ProcessConstants.NodeState this can also be the iteration count or a similar node
attribute.- Author:
- Ulrich Kreher
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ProcessConstants.NodeStateThe state in which the process step currently is and which prevents the desired state transition.protected final QualifiedAgentThe performing agent in case the corresponding activity is currently executed or has been executed. -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a newInvalidActivityStateExceptionwhich encapsulates a string describing the node attribute that has the wrong state for the desired state transition.InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string and the current state of the activity.InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string, the current state of the activity and the agent.protectedInvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent, Throwable cause) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string, the current state of the activity, the agent executing the activity and the cause for this exception.InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, Throwable cause) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string, the current state of the activity and the cause for this exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the state the process step was in and that prevented the desired state transition.getAgent()Returns the agent who is currently executing or has executed the activity that caused this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
activityState
The state in which the process step currently is and which prevents the desired state transition. -
agent
The performing agent in case the corresponding activity is currently executed or has been executed.
-
-
Constructor Details
-
InvalidActivityStateException
public InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, Throwable cause) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string, the current state of the activity and the cause for this exception. The cause is usually used by specific subclasses.- Parameters:
msg- The message for the exception.activityState- The current state of the activity (process step) which prevents the desired state transition.cause- The exception causing theInvalidActivityStateExceptionproviding additional information.
-
InvalidActivityStateException
protected InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent, Throwable cause) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string, the current state of the activity, the agent executing the activity and the cause for this exception. The cause is usually used by specific subclasses.- Parameters:
msg- The message for the exception.activityState- The current state of the activity (process step) which prevents the desired state transition.agent- The performing agent who executes or has executed the corresponding activity.cause- The exception causing theInvalidActivityStateExceptionproviding additional information.
-
InvalidActivityStateException
public InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent) Constructs a newInvalidActivityStateExceptionwhich encapsulates a string, the current state of the activity and the agent.- Parameters:
msg- The message for the exception.activityState- The current state of the activity (process step) which prevents the desired state transition.agent- The performing agent who executes or has executed the corresponding activity.
-
InvalidActivityStateException
Constructs a newInvalidActivityStateExceptionwhich encapsulates a string and the current state of the activity.- Parameters:
msg- The message for the exception.activityState- The current state of the activity (process step) which prevents the desired state transition.
-
InvalidActivityStateException
Constructs a newInvalidActivityStateExceptionwhich encapsulates a string describing the node attribute that has the wrong state for the desired state transition.- Parameters:
msg- The message for the exception describing the problem (not caused by aNodeState).
-
-
Method Details
-
getActivityState
Returns the state the process step was in and that prevented the desired state transition. This will benullin case theNodeStateis not the problem but another node attribute.- Returns:
- The state of the process step that caused the exception or
nullin case this exception is not raised due to aNodeState.
-
getAgent
Returns the agent who is currently executing or has executed the activity that caused this exception. This will benullin case the activity has no assigned agent.- Returns:
- The agent assigned to the activity that caused the exception or
nullin case the activity has no assigned agent.
-