Interface UpdatableProcessInstance

    • Method Detail

      • setInstanceId

        void setInstanceId​(String instanceId)
        Set the workflow instance id
        Parameters:
        instanceId - instance id
      • setModelId

        void setModelId​(String modelId)
        Set the workflow model id
        Parameters:
        modelId - model id
      • addHistoryStep

        void addHistoryStep​(HistoryStep step)
                     throws WorkflowException
        Add a step in the history of actions performed in this process instance.
        Parameters:
        step - a step in the workflow process history.
        Throws:
        WorkflowException
      • updateHistoryStep

        void updateHistoryStep​(HistoryStep step)
        Update the related history step by the given one.
        Parameters:
        step - a step in the workflow process history.
      • reDoState

        void reDoState​(String state,
                       Date actionDate)
                throws WorkflowException
        Cancel all the atomic operations since the step where first action had occurred
        Parameters:
        state - the name of state where ac action has been discussed
        actionDate - date of state re-resolving
        Throws:
        WorkflowException
      • addActiveState

        void addActiveState​(State state)
                     throws WorkflowException
        Adds the specified state as an active one in this process instance. An active state is the current state of the process instance; that is to say a state that is currently waiting for actions by working users. A process instance can have several active states in parallel.
        Parameters:
        state - the active state.
        Throws:
        WorkflowException
      • removeActiveState

        void removeActiveState​(State state)
                        throws WorkflowException
        Removes the specified state as an active one. An active state is the current state of the process instance; that is to say a state that is currently waiting for actions by working users. A process instance can have several active states in parallel.
        Parameters:
        state - the active state.
        Throws:
        WorkflowException
      • addTimeout

        void addTimeout​(State state)
                 throws WorkflowException
        Adds a timeout to the specified active state. A timeout is a way to avoid a long time state. The time out is defined by a TimeOutAction provided by the specified state.
        Parameters:
        state - the state for which a time out has to be added.
        Throws:
        WorkflowException
      • removeTimeout

        void removeTimeout​(State state)
                    throws WorkflowException
        Removes the timeout from the specified active state. A timeout is a way to avoid a long time state.
        Parameters:
        state - the state for which a time out has to be removed.
        Throws:
        WorkflowException
      • addWorkingUser

        void addWorkingUser​(User user,
                            State state,
                            String role)
                     throws WorkflowException
        Adds the specified working user to the given state with the specified role.
        Parameters:
        user - the working user to add
        state - the state on which the user will work
        role - the role the user will play in the above state
        Throws:
        WorkflowException - if the adding fails.
      • addWorkingUser

        void addWorkingUser​(Actor actor,
                            State state)
                     throws WorkflowException
        Adds the specified actor to the given state.
        Parameters:
        actor - the actor to add
        state - the state for which the actor has to be defined
        Throws:
        WorkflowException - if the adding fails.
      • removeWorkingUser

        void removeWorkingUser​(User user,
                               State state,
                               String role)
                        throws WorkflowException
        Removes the specified user from the working users of the specified state and with the given role.
        Parameters:
        user - the user to remove.
        state - the state from which the user has to be removed
        role - the role the user plays in the above state
        Throws:
        WorkflowException - if the removing fails.
      • removeWorkingUsers

        void removeWorkingUsers​(State state)
                         throws WorkflowException
        Remove all working users for given state
        Parameters:
        state - state for which the user is interested
        Throws:
        WorkflowException
      • addInterestedUser

        void addInterestedUser​(User user,
                               State state,
                               String role)
                        throws WorkflowException
        Add an user in the interested user list
        Parameters:
        user - user to add
        state - state for which the user is interested
        role - role name under which the user is interested
        Throws:
        WorkflowException
      • removeInterestedUser

        void removeInterestedUser​(User user,
                                  State state,
                                  String role)
                           throws WorkflowException
        Remove an user from the interested user list
        Parameters:
        user - user to remove
        state - state for which the user is interested
        role - role name under which the user is interested
        Throws:
        WorkflowException
      • removeInterestedUsers

        void removeInterestedUsers​(State state)
                            throws WorkflowException
        Remove all interested users for given state
        Parameters:
        state - state for which the user is interested
        Throws:
        WorkflowException
      • setErrorStatus

        void setErrorStatus​(boolean errorStatus)
        Set the error status of this instance
        Parameters:
        errorStatus - true if this instance is in error
      • computeValid

        void computeValid()
      • setTimeoutStatus

        void setTimeoutStatus​(boolean timeoutStatus)
        Set the timeout status of this instance
        Parameters:
        timeoutStatus - true if this instance is in an active state for a long long time