| com.opensymphony.workflow.Workflow
All known Subclasses: com.opensymphony.workflow.soap.OfbizSOAPWorkflow, com.opensymphony.workflow.soap.BasicSOAPWorkflow, com.opensymphony.workflow.ejb.EJBWorkflow, com.opensymphony.workflow.AbstractWorkflow,
Method Summary | |
public boolean | canInitialize(String workflowName, int initialStep) Check if the calling user has enough permissions to initialise the specified workflow.
Parameters: workflowName - The name of the workflow to check. Parameters: initialStep - The id of the initial state to check. | boolean | canInitialize(String workflowName, int initialAction, Map inputs) Determine if a particular workflow can be initialized.
Parameters: workflowName - The workflow name to check. Parameters: initialAction - The potential initial action. Parameters: inputs - The inputs to check. | public boolean | canModifyEntryState(long id, int newState) Check if the state of the specified workflow instance can be changed to the new specified one.
Parameters: id - The workflow instance id. Parameters: newState - The new state id. | public void | changeEntryState(long id, int newState) Modify the state of the specified workflow instance.
Parameters: id - The workflow instance id. Parameters: newState - the new state to change the workflow instance to.If the new state is com.opensymphony.workflow.spi.WorkflowEntry.KILLEDor com.opensymphony.workflow.spi.WorkflowEntry.COMPLETEDthen all current steps are moved to history steps. | public void | doAction(long id, int actionId, Map inputs) Perform an action on the specified workflow instance. | public void | executeTriggerFunction(long id, int triggerId) Executes a special trigger-function using the context of the given workflow instance id. | public int[] | getAvailableActions(long id) | int[] | getAvailableActions(long id, Map inputs) Get the available actions for the specified workflow instance. | public List | getCurrentSteps(long id) Returns a Collection of Step objects that are the current steps of the specified workflow instance.
Parameters: id - The workflow instance id. | public int | getEntryState(long id) Return the state of the specified workflow instance id.
Parameters: id - The workflow instance id. | public List | getHistorySteps(long id) Returns a list of all steps that are completed for the given workflow instance id.
Parameters: id - The workflow instance id. | public PropertySet | getPropertySet(long id) Get the PropertySet for the specified workflow instance id. | public List | getSecurityPermissions(long id) Get a collection (Strings) of currently defined permissions for the specified workflow instance.
Parameters: id - the workflow instance id. | public List | getSecurityPermissions(long id, Map inputs) Get a collection (Strings) of currently defined permissions for the specified workflow instance.
Parameters: id - id the workflow instance id. Parameters: inputs - inputs The inputs to the workflow instance. | public WorkflowDescriptor | getWorkflowDescriptor(String workflowName) Get the workflow descriptor for the specified workflow name. | public String | getWorkflowName(long id) Get the name of the specified workflow instance. | String[] | getWorkflowNames() Get all available workflow names. | public long | initialize(String workflowName, int initialAction, Map inputs) Initializes a workflow so that it can begin processing. | public List | query(WorkflowQuery query) | public List | query(WorkflowExpressionQuery query) | boolean | removeWorkflowDescriptor(String workflowName) Remove the specified workflow descriptor.
Parameters: workflowName - The workflow name of the workflow to remove. | boolean | saveWorkflowDescriptor(String workflowName, WorkflowDescriptor descriptor, boolean replace) | void | setConfiguration(Configuration configuration) Set the configuration for this workflow. |
canInitialize | public boolean canInitialize(String workflowName, int initialStep)(Code) | | Check if the calling user has enough permissions to initialise the specified workflow.
Parameters: workflowName - The name of the workflow to check. Parameters: initialStep - The id of the initial state to check. true if the user can successfully call initialize, false otherwise. |
canInitialize | boolean canInitialize(String workflowName, int initialAction, Map inputs)(Code) | | Determine if a particular workflow can be initialized.
Parameters: workflowName - The workflow name to check. Parameters: initialAction - The potential initial action. Parameters: inputs - The inputs to check. true if the workflow can be initialized, false otherwise. |
canModifyEntryState | public boolean canModifyEntryState(long id, int newState)(Code) | | Check if the state of the specified workflow instance can be changed to the new specified one.
Parameters: id - The workflow instance id. Parameters: newState - The new state id. true if the state of the workflow can be modified, false otherwise. |
changeEntryState | public void changeEntryState(long id, int newState) throws WorkflowException(Code) | | Modify the state of the specified workflow instance.
Parameters: id - The workflow instance id. Parameters: newState - the new state to change the workflow instance to.If the new state is com.opensymphony.workflow.spi.WorkflowEntry.KILLEDor com.opensymphony.workflow.spi.WorkflowEntry.COMPLETEDthen all current steps are moved to history steps. If the new state is |
doAction | public void doAction(long id, int actionId, Map inputs) throws InvalidInputException, WorkflowException(Code) | | Perform an action on the specified workflow instance.
Parameters: id - The workflow instance id. Parameters: actionId - The action id to perform (action id's are listed in the workflow descriptor). Parameters: inputs - The inputs to the workflow instance. throws: InvalidInputException - if a validator is specified and an input is invalid. throws: InvalidActionException - if the action is invalid for the specified workflowinstance's current state. |
executeTriggerFunction | public void executeTriggerFunction(long id, int triggerId) throws WorkflowException(Code) | | Executes a special trigger-function using the context of the given workflow instance id.
Note that this method is exposed for Quartz trigger jobs, user code should never call it.
Parameters: id - The workflow instance id Parameters: triggerId - The id of the speciail trigger-function |
getAvailableActions | int[] getAvailableActions(long id, Map inputs)(Code) | | Get the available actions for the specified workflow instance.
Parameters: id - The workflow instance id. Parameters: inputs - The inputs map to pass on to conditions An array of action id's that can be performed on the specified entry throws: IllegalArgumentException - if the specified id does not exist, or if its workflowdescriptor is no longer available or has become invalid. |
getCurrentSteps | public List getCurrentSteps(long id)(Code) | | Returns a Collection of Step objects that are the current steps of the specified workflow instance.
Parameters: id - The workflow instance id. The steps that the workflow instance is currently in. |
getEntryState | public int getEntryState(long id)(Code) | | Return the state of the specified workflow instance id.
Parameters: id - The workflow instance id. int The state id of the specified workflow |
getHistorySteps | public List getHistorySteps(long id)(Code) | | Returns a list of all steps that are completed for the given workflow instance id.
Parameters: id - The workflow instance id. a List of Steps See Also: com.opensymphony.workflow.spi.Step |
getPropertySet | public PropertySet getPropertySet(long id)(Code) | | Get the PropertySet for the specified workflow instance id.
Parameters: id - The workflow instance id. |
getSecurityPermissions | public List getSecurityPermissions(long id)(Code) | | Get a collection (Strings) of currently defined permissions for the specified workflow instance.
Parameters: id - the workflow instance id. A List of permissions specified currently (a permission is a string name).Workflow.getSecurityPermissions(long,java.util.Map) |
getSecurityPermissions | public List getSecurityPermissions(long id, Map inputs)(Code) | | Get a collection (Strings) of currently defined permissions for the specified workflow instance.
Parameters: id - id the workflow instance id. Parameters: inputs - inputs The inputs to the workflow instance. A List of permissions specified currently (a permission is a string name). |
getWorkflowDescriptor | public WorkflowDescriptor getWorkflowDescriptor(String workflowName)(Code) | | Get the workflow descriptor for the specified workflow name.
Parameters: workflowName - The workflow name. |
getWorkflowName | public String getWorkflowName(long id)(Code) | | Get the name of the specified workflow instance.
Parameters: id - the workflow instance id. |
getWorkflowNames | String[] getWorkflowNames()(Code) | | Get all available workflow names.
|
removeWorkflowDescriptor | boolean removeWorkflowDescriptor(String workflowName) throws FactoryException(Code) | | Remove the specified workflow descriptor.
Parameters: workflowName - The workflow name of the workflow to remove. true if the workflow was removed, false otherwise. throws: FactoryException - If the underlying workflow factory has an error removing the workflow,or if it does not support the removal of workflows. |
saveWorkflowDescriptor | boolean saveWorkflowDescriptor(String workflowName, WorkflowDescriptor descriptor, boolean replace) throws FactoryException(Code) | | Add a new workflow descriptor
Parameters: workflowName - The workflow name of the workflow to add Parameters: descriptor - The workflow descriptor to add Parameters: replace - true, if an existing descriptor should be overwritten true if the workflow was added, fales otherwise throws: FactoryException - If the underlying workflow factory has an error adding the workflow,or if it does not support adding workflows. |
setConfiguration | void setConfiguration(Configuration configuration)(Code) | | Set the configuration for this workflow.
If not set, then the workflow will use the default configuration static instance.
Parameters: configuration - a workflow configuration |
|
|