public abstract class AbstractWorkflowAction extends ServiceableAction implements Initializable
The following parameters are supported:
| Modifier and Type | Field and Description |
|---|---|
protected WorkflowProvider |
_workflowProvider
Workflow provider
|
managerEMPTY_MAP| Constructor and Description |
|---|
AbstractWorkflowAction() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Map |
_act(Redirector redirector,
Map objectModel,
String source,
Parameters parameters,
int actionId,
Map inputs)
Initialize or act on a workflow instance.
|
protected int |
_getActionId(Map objectModel,
String source,
Parameters parameters)
Provide the action id to use.
|
protected abstract String |
_getExceptionContext(Map objectModel,
String source,
Parameters parameters)
Provides the exception context for a more friendly error message.
|
protected String |
_getFailConditions(Map inputs)
Get the fail conditions as a String
|
protected Map<String,Object> |
_getInputs(Redirector redirector,
Map objectModel,
String source,
Parameters parameters)
Provide the inputs to use.
|
protected Errors |
_getWorkflowErrors(Map inputs)
Get the workflow errors
|
protected Errors |
_getWorkflowWarns(Map inputs)
Get the workflow warnings
|
protected Map |
_processInvalidActionException(Redirector redirector,
Map objectModel,
String source,
Parameters parameters,
long actionId,
Map inputs,
com.opensymphony.workflow.InvalidActionException e)
Called when the current action is invalid.
|
protected Map |
_processWorkflowException(Redirector redirector,
Map objectModel,
String source,
Parameters parameters,
long actionId,
com.opensymphony.workflow.WorkflowException e)
Called when the current action has thrown a
WorkflowException. |
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
void |
initialize() |
serviceenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected WorkflowProvider _workflowProvider
public AbstractWorkflowAction()
public void initialize() throws Exception
initialize in interface InitializableExceptionpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
protected int _getActionId(Map objectModel, String source, Parameters parameters) throws Exception
Default implementation uses parameter actionId.
objectModel - the current object model.source - the current source.parameters - the current parameters.Exception - if an error occurs.protected Map<String,Object> _getInputs(Redirector redirector, Map objectModel, String source, Parameters parameters) throws Exception
Default implementation provide the redirector.
redirector - the redirector.objectModel - the current object model.source - the current source.parameters - the current parameters.Exception - if an error occurs.protected abstract Map _act(Redirector redirector, Map objectModel, String source, Parameters parameters, int actionId, Map inputs) throws com.opensymphony.workflow.InvalidInputException, com.opensymphony.workflow.WorkflowException
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 usecom.opensymphony.workflow.InvalidInputException - if the action id is not valid.com.opensymphony.workflow.WorkflowException - if the action failed.protected Map _processInvalidActionException(Redirector redirector, Map objectModel, String source, Parameters parameters, long actionId, Map inputs, com.opensymphony.workflow.InvalidActionException e) throws Exception
Default implementation throw an exception.
redirector - the redirector.objectModel - the current object model.source - the current source.parameters - the current parameters.actionId - the invalid action id.inputs - the inputse - the invalid action exception.Exception - in order to stop the current pipeline.protected String _getFailConditions(Map inputs)
inputs - the inputsprotected Errors _getWorkflowErrors(Map inputs)
inputs - The inputsprotected Errors _getWorkflowWarns(Map inputs)
inputs - The inputsprotected Map _processWorkflowException(Redirector redirector, Map objectModel, String source, Parameters parameters, long actionId, com.opensymphony.workflow.WorkflowException e) throws Exception
WorkflowException.Default implementation throw an exception.
redirector - the redirector.objectModel - the current object model.source - the current source.parameters - the current parameters.actionId - the invalid action id.e - the workflow exception.Exception - in order to stop the current pipeline.protected abstract String _getExceptionContext(Map objectModel, String source, Parameters parameters)
objectModel - the current object model.source - the current source.parameters - the current parameters.