Class InitializeWorkflowAction

All Implemented Interfaces:
Initializable, Component, LogEnabled, Serviceable, Action
Direct Known Subclasses:
InitializeContentWorkflowAction

Action for initializing a workflow.

The following parameters are supported:

workflowName
the name of the workflow to instantiate
actionId
the id of the action to fire
Map returned contains the workflow id on successful creation (workflowId key) and throw an exception on error.
  • Constructor Details

  • Method Details

    • _act

      protected Map _act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs) throws com.opensymphony.workflow.InvalidInputException, com.opensymphony.workflow.WorkflowException
      Description copied from class: AbstractWorkflowAction
      Initialize or act on a workflow instance.

      Specified by:
      _act in class AbstractWorkflowAction
      Parameters:
      redirector - the redirector.
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      actionId - the action id to use.
      inputs - the inputs to use
      Returns:
      the action result.
      Throws:
      com.opensymphony.workflow.InvalidInputException - if the action id is not valid.
      com.opensymphony.workflow.WorkflowException - if the action failed.
    • _getWorkflowName

      protected String _getWorkflowName(Map objectModel, String source, Parameters parameters)
      Provides the workflow name to use.
      Parameters:
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      Returns:
      the workflow name.
    • _getActionResult

      protected Map _getActionResult(Redirector redirector, Map objectModel, String source, Parameters parameters, long workflowId)
      Provides the action result after successful workflow instance creation.

      Default implementation provides a singleton Map with workflowId key and workflow id value.

      Parameters:
      redirector - the redirector.
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      workflowId - the workflow instance id.
      Returns:
      the action result.
    • _getExceptionContext

      protected String _getExceptionContext(Map objectModel, String source, Parameters parameters)
      Description copied from class: AbstractWorkflowAction
      Provides the exception context for a more friendly error message.
      Specified by:
      _getExceptionContext in class AbstractWorkflowAction
      Parameters:
      objectModel - the current object model.
      source - the current source.
      parameters - the current parameters.
      Returns:
      the message describing the exception context.