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
public class InvalidActivityStateException extends Exception
This exception will be raised if an activity (a process step) is not in the right state to perform a desired state transition. Besides theProcessConstants.NodeState
this can also be the iteration count or a similar node attribute.- Author:
- Ulrich Kreher
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ProcessConstants.NodeState
activityState
The state in which the process step currently is and which prevents the desired state transition.protected QualifiedAgent
agent
The performing agent in case the corresponding activity is currently executed or has been executed.
-
Constructor Summary
Constructors Modifier Constructor Description InvalidActivityStateException(String msg)
Constructs a newInvalidActivityStateException
which 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 newInvalidActivityStateException
which encapsulates a string and the current state of the activity.InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent)
Constructs a newInvalidActivityStateException
which encapsulates a string, the current state of the activity and the agent.protected
InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent, Throwable cause)
Constructs a newInvalidActivityStateException
which 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 newInvalidActivityStateException
which encapsulates a string, the current state of the activity and the cause for this exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessConstants.NodeState
getActivityState()
Returns the state the process step was in and that prevented the desired state transition.QualifiedAgent
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 Detail
-
activityState
protected final ProcessConstants.NodeState activityState
The state in which the process step currently is and which prevents the desired state transition.
-
agent
protected final QualifiedAgent agent
The performing agent in case the corresponding activity is currently executed or has been executed.
-
-
Constructor Detail
-
InvalidActivityStateException
public InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, Throwable cause)
Constructs a newInvalidActivityStateException
which 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 theInvalidActivityStateException
providing additional information.
-
InvalidActivityStateException
protected InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent, Throwable cause)
Constructs a newInvalidActivityStateException
which 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 theInvalidActivityStateException
providing additional information.
-
InvalidActivityStateException
public InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState, QualifiedAgent agent)
Constructs a newInvalidActivityStateException
which 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
public InvalidActivityStateException(String msg, ProcessConstants.NodeState activityState)
Constructs a newInvalidActivityStateException
which 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
public InvalidActivityStateException(String msg)
Constructs a newInvalidActivityStateException
which 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 Detail
-
getActivityState
public ProcessConstants.NodeState getActivityState()
Returns the state the process step was in and that prevented the desired state transition. This will benull
in case theNodeState
is not the problem but another node attribute.- Returns:
- The state of the process step that caused the exception or
null
in case this exception is not raised due to aNodeState
.
-
getAgent
public QualifiedAgent getAgent()
Returns the agent who is currently executing or has executed the activity that caused this exception. This will benull
in case the activity has no assigned agent.- Returns:
- The agent assigned to the activity that caused the exception or
null
in case the activity has no assigned agent.
-
-