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
public abstract class AbstractAmetysWorkflow extends com.opensymphony.workflow.AbstractWorkflow
Base Ametys class for manipulating workflow instances.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Long,ReentrantLock>_instancesLocksReentrant locks for synchronizing access to each instanceprotected static org.slf4j.Logger_loggerLogger available to subclasses.protected WorkflowHelper_workflowHelperworkflow helper
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAmetysWorkflow(WorkflowHelper workflowHelper, com.opensymphony.workflow.WorkflowContext workflowContext)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddoAction(long id, int actionId, Map inputs)int[]getAvailableActions(long id)Deprecated.int[]getAvailableActions(long id, Map inputs)longinitialize(String workflowName, int initialActionId, Map inputs)Creates a new workflow instance of a particular type of workflow.protected booleantransitionWorkflow(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 Detail
-
_logger
protected static org.slf4j.Logger _logger
Logger available to subclasses.
-
_instancesLocks
protected Map<Long,ReentrantLock> _instancesLocks
Reentrant locks for synchronizing access to each instance
-
_workflowHelper
protected WorkflowHelper _workflowHelper
workflow helper
-
-
Constructor Detail
-
AbstractAmetysWorkflow
protected AbstractAmetysWorkflow(WorkflowHelper workflowHelper, com.opensymphony.workflow.WorkflowContext workflowContext)
Constructor- Parameters:
workflowHelper- The workflow helperworkflowContext- The workflow context
-
-
Method Detail
-
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:
initializein interfacecom.opensymphony.workflow.Workflow- Overrides:
initializein classcom.opensymphony.workflow.AbstractWorkflow- Parameters:
workflowName- the type of the workflow.initialActionId- the initial action to perform orInteger.MIN_VALUEin 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
public int[] getAvailableActions(long id, Map inputs)
- Specified by:
getAvailableActionsin interfacecom.opensymphony.workflow.Workflow- Overrides:
getAvailableActionsin classcom.opensymphony.workflow.AbstractWorkflow
-
getAvailableActions
@Deprecated public int[] getAvailableActions(long id)
Deprecated.- Specified by:
getAvailableActionsin interfacecom.opensymphony.workflow.Workflow- Overrides:
getAvailableActionsin classcom.opensymphony.workflow.AbstractWorkflow
-
doAction
public void doAction(long id, int actionId, Map inputs) throws com.opensymphony.workflow.WorkflowException
- Specified by:
doActionin interfacecom.opensymphony.workflow.Workflow- Overrides:
doActionin 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:
transitionWorkflowin classcom.opensymphony.workflow.AbstractWorkflow- Throws:
com.opensymphony.workflow.WorkflowException
-
-