Interface Action<T extends BusinessProcessModel>

    • Field Detail

      • RETRY_RETURN_CODE

        static final java.lang.String RETRY_RETURN_CODE
        Special return code to be interpreted by the Process Engine. If an Action's execute method returns RETRY_RETURN_CODE it tells the process engine, that it currently is unable to fulfill it's logic and that execution should be scheduled for a later time. The retry return code can not be overridden by any transition mapping.
        See Also:
        Constant Field Values
      • ERROR_RETURN_CODE

        static final java.lang.String ERROR_RETURN_CODE
        Special return code to be interpreted by the Process Engine. If an Action's execute method returns ERROR_RETURN_CODE it tells the process engine, that an internal error occurred. The process will be marked accordingly. The default behavior (ending process with error), can be overridden on process definition level by specifying an onError node to continue with and/or on action level by specifying a transition for return code error.
        See Also:
        Constant Field Values
    • Method Detail

      • execute

        java.lang.String execute​(T process)
                          throws RetryLaterException,
                                 java.lang.Exception
        Executes this Action's business logic working on the given BusinessProcessModel.
        Parameters:
        process - The process context to work on.
        Returns:
        the return code as stated in the process definition. This code is used by the process engine to determine the next actions.
        Throws:
        java.lang.Exception
        RetryLaterException
      • getCurrentActionDefinitionContext

        default ActionDefinitionContext getCurrentActionDefinitionContext()
        Retrieves additional information about the executed action
        Returns:
        ActionDefinitionContext containing additional information
      • getTransitions

        java.util.Set<java.lang.String> getTransitions()
        Accesses all possible return codes of this Action. This method is used by the process engine to validate a process definition. Furthermore it can be used by (graphical) editors to access all return codes which have to mapped in transitions.
        Returns:
        all possible return codes of this Action