Class InvalidActivityStateException

    • 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 new InvalidActivityStateException 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 the InvalidActivityStateException providing additional information.
      • InvalidActivityStateException

        protected InvalidActivityStateException​(String msg,
                                                ProcessConstants.NodeState activityState,
                                                QualifiedAgent agent,
                                                Throwable cause)
        Constructs a new InvalidActivityStateException 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 the InvalidActivityStateException providing additional information.
      • InvalidActivityStateException

        public InvalidActivityStateException​(String msg,
                                             ProcessConstants.NodeState activityState,
                                             QualifiedAgent agent)
        Constructs a new InvalidActivityStateException 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 new InvalidActivityStateException 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 new InvalidActivityStateException 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 a NodeState).
    • Method Detail

      • getActivityState

        public ProcessConstants.NodeState getActivityState()
        Returns the state the process step was in and that prevented the desired state transition. This will be null in case the NodeState 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 a NodeState.
      • getAgent

        public QualifiedAgent getAgent()
        Returns the agent who is currently executing or has executed the activity that caused this exception. This will be null 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.