Class ActionResult


  • public class ActionResult
    extends Object
    Represents the result of an Action. The result consists of 2 parts: a type and a result.

    The type is represented by an Enum and can be something like:

    TYPE_OUTCOME:
    we have a certain outcome so move to another action/step.
    TYPE_ERROR:
    an error has occurred while processing the action.
    TYPE_PAGE:
    return to a specified page
    TYPE_CANCEL:
    cancel the action
    TYPE_SUBMISSION_PAGE:
    return to the submission page

    The optional result integer is used to determine the next step once the action has completed. If not set, it will be -1.

    Author:
    Bram De Schouwer (bram.deschouwer at dot com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
    • Field Detail

      • OUTCOME_COMPLETE

        public static final int OUTCOME_COMPLETE
        Outcome code which indicates that the Action was completed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActionResult

        public ActionResult​(ActionResult.TYPE type,
                            int result)
        Action taken, with a detailed result.
        Parameters:
        type - how the workflow should proceed.
        result - detail for how to proceed.
      • ActionResult

        public ActionResult​(ActionResult.TYPE type)
        Action taken without a result.
        Parameters:
        type - how the workflow should proceed.
    • Method Detail

      • getResult

        public int getResult()
        Returns:
        details of the users' decision.
      • getType

        public ActionResult.TYPE getType()
        Returns:
        the decision of the Action's users.