Package org.ametys.plugins.workflow
Class AbstractAmetysWorkflow
java.lang.Object
com.opensymphony.workflow.AbstractWorkflow
org.ametys.plugins.workflow.AbstractAmetysWorkflow
- All Implemented Interfaces:
com.opensymphony.workflow.Workflow
- Direct Known Subclasses:
WorkflowProvider.AmetysObjectWorkflow
,WorkflowProvider.ExternalWorkflow
,WorkflowProvider.GenericWorkflow
Base Ametys class for manipulating workflow instances.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<Long,
ReentrantLock> Reentrant locks for synchronizing access to each instanceprotected static Logger
Logger available to subclasses.protected WorkflowHelper
workflow helperFields inherited from class com.opensymphony.workflow.AbstractWorkflow
configuration, context, log
Fields inherited from interface com.opensymphony.workflow.Workflow
BSF_COL, BSF_LANGUAGE, BSF_ROW, BSF_SCRIPT, BSF_SOURCE, BSH_SCRIPT, CLASS_NAME, EJB_LOCATION, JNDI_LOCATION
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAmetysWorkflow
(WorkflowHelper workflowHelper, com.opensymphony.workflow.WorkflowContext workflowContext) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
int[]
getAvailableActions
(long id) Deprecated.int[]
getAvailableActions
(long id, Map inputs) long
initialize
(String workflowName, int initialActionId, Map inputs) Creates a new workflow instance of a particular type of workflow.protected boolean
transitionWorkflow
(com.opensymphony.workflow.spi.WorkflowEntry entry, List currentSteps, com.opensymphony.workflow.spi.WorkflowStore store, com.opensymphony.workflow.loader.WorkflowDescriptor wf, com.opensymphony.workflow.loader.ActionDescriptor action, Map transientVars, Map inputs, com.opensymphony.module.propertyset.PropertySet ps) Methods inherited from class com.opensymphony.workflow.AbstractWorkflow
canInitialize, canInitialize, canInitialize, canModifyEntryState, changeEntryState, checkImplicitFinish, completeEntry, createNewCurrentStep, executeFunction, executeTriggerFunction, getAvailableActionsForStep, getAvailableAutoActions, getAvailableAutoActionsForStep, getConfiguration, getCurrentStep, getCurrentSteps, getEntryState, getHistorySteps, getPersistence, getPersistenceProperties, getPropertySet, getResolver, getSecurityPermissions, getSecurityPermissions, getWorkflowDescriptor, getWorkflowName, getWorkflowNames, isActionAvailable, passesCondition, passesConditions, passesConditions, populateTransientMap, query, query, removeWorkflowDescriptor, saveWorkflowDescriptor, setConfiguration, setResolver, verifyInputs
-
Field Details
-
_logger
Logger available to subclasses. -
_instancesLocks
Reentrant locks for synchronizing access to each instance -
_workflowHelper
workflow helper
-
-
Constructor Details
-
AbstractAmetysWorkflow
protected AbstractAmetysWorkflow(WorkflowHelper workflowHelper, com.opensymphony.workflow.WorkflowContext workflowContext) Constructor- Parameters:
workflowHelper
- The workflow helperworkflowContext
- The workflow context
-
-
Method Details
-
initialize
public long initialize(String workflowName, int initialActionId, Map inputs) throws com.opensymphony.workflow.WorkflowException Creates a new workflow instance of a particular type of workflow.- Specified by:
initialize
in interfacecom.opensymphony.workflow.Workflow
- Overrides:
initialize
in classcom.opensymphony.workflow.AbstractWorkflow
- Parameters:
workflowName
- the type of the workflow.initialActionId
- the initial action to perform orInteger.MIN_VALUE
in order to use the first initial action.inputs
- the arguments to transmit to the workflow. Can not be null.- Returns:
- the workflow instance id.
- Throws:
com.opensymphony.workflow.WorkflowException
-
getAvailableActions
- Specified by:
getAvailableActions
in interfacecom.opensymphony.workflow.Workflow
- Overrides:
getAvailableActions
in classcom.opensymphony.workflow.AbstractWorkflow
-
getAvailableActions
Deprecated.- Specified by:
getAvailableActions
in interfacecom.opensymphony.workflow.Workflow
- Overrides:
getAvailableActions
in classcom.opensymphony.workflow.AbstractWorkflow
-
doAction
public void doAction(long id, int actionId, Map inputs) throws com.opensymphony.workflow.WorkflowException - Specified by:
doAction
in interfacecom.opensymphony.workflow.Workflow
- Overrides:
doAction
in classcom.opensymphony.workflow.AbstractWorkflow
- Throws:
com.opensymphony.workflow.WorkflowException
-
transitionWorkflow
protected boolean transitionWorkflow(com.opensymphony.workflow.spi.WorkflowEntry entry, List currentSteps, com.opensymphony.workflow.spi.WorkflowStore store, com.opensymphony.workflow.loader.WorkflowDescriptor wf, com.opensymphony.workflow.loader.ActionDescriptor action, Map transientVars, Map inputs, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Overrides:
transitionWorkflow
in classcom.opensymphony.workflow.AbstractWorkflow
- Throws:
com.opensymphony.workflow.WorkflowException
-