Class InitializeWorkflowAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
org.ametys.plugins.workflow.cocoon.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.-
Field Summary
Fields inherited from class org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
_workflowProviderFields inherited from class org.apache.cocoon.acting.ServiceableAction
managerFields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map_act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs) Initialize or act on a workflow instance.protected Map_getActionResult(Redirector redirector, Map objectModel, String source, Parameters parameters, long workflowId) Provides the action result after successful workflow instance creation.protected String_getExceptionContext(Map objectModel, String source, Parameters parameters) Provides the exception context for a more friendly error message.protected String_getWorkflowName(Map objectModel, String source, Parameters parameters) Provides the workflow name to use.Methods inherited from class org.ametys.plugins.workflow.cocoon.AbstractWorkflowAction
_getActionId, _getFailConditions, _getInputs, _getWorkflowErrors, _getWorkflowWarns, _processInvalidActionException, _processWorkflowException, act, initializeMethods inherited from class org.apache.cocoon.acting.ServiceableAction
serviceMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
InitializeWorkflowAction
public InitializeWorkflowAction()
-
-
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:AbstractWorkflowActionInitialize or act on a workflow instance.- Specified by:
_actin classAbstractWorkflowAction- 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
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
MapwithworkflowIdkey 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
Description copied from class:AbstractWorkflowActionProvides the exception context for a more friendly error message.- Specified by:
_getExceptionContextin classAbstractWorkflowAction- Parameters:
objectModel- the current object model.source- the current source.parameters- the current parameters.- Returns:
- the message describing the exception context.
-