public interface Workflow
Modifier and Type | Field and Description |
---|---|
static String |
BSF_COL |
static String |
BSF_LANGUAGE |
static String |
BSF_ROW |
static String |
BSF_SCRIPT |
static String |
BSF_SOURCE |
static String |
BSH_SCRIPT |
static String |
CLASS_NAME |
static String |
EJB_LOCATION |
static String |
JNDI_LOCATION |
Modifier and Type | Method and Description |
---|---|
boolean |
canInitialize(String workflowName,
int initialStep)
Check if the calling user has enough permissions to initialise the specified workflow.
|
boolean |
canInitialize(String workflowName,
int initialAction,
Map inputs)
Determine if a particular workflow can be initialized.
|
boolean |
canModifyEntryState(long id,
int newState)
Check if the state of the specified workflow instance can be changed to the new specified one.
|
void |
changeEntryState(long id,
int newState)
Modify the state of the specified workflow instance.
|
void |
doAction(long id,
int actionId,
Map inputs)
Perform an action on the specified workflow instance.
|
void |
executeTriggerFunction(long id,
int triggerId)
Executes a special trigger-function using the context of the given workflow instance id.
|
int[] |
getAvailableActions(long id)
Deprecated.
use
getAvailableActions(long, Map) with an empty Map instead. |
int[] |
getAvailableActions(long id,
Map inputs)
Get the available actions for the specified workflow instance.
|
List |
getCurrentSteps(long id)
Returns a Collection of Step objects that are the current steps of the specified workflow instance.
|
int |
getEntryState(long id)
Return the state of the specified workflow instance id.
|
List |
getHistorySteps(long id)
Returns a list of all steps that are completed for the given workflow instance id.
|
com.opensymphony.module.propertyset.PropertySet |
getPropertySet(long id)
Get the PropertySet for the specified workflow instance id.
|
List |
getSecurityPermissions(long id)
Deprecated.
use
getSecurityPermissions(long, java.util.Map) with a null map instead. |
List |
getSecurityPermissions(long id,
Map inputs)
Get a collection (Strings) of currently defined permissions for the specified workflow instance.
|
WorkflowDescriptor |
getWorkflowDescriptor(String workflowName)
Get the workflow descriptor for the specified workflow name.
|
String |
getWorkflowName(long id)
Get the name of the specified workflow instance.
|
String[] |
getWorkflowNames()
Get all available workflow names.
|
long |
initialize(String workflowName,
int initialAction,
Map inputs)
Initializes a workflow so that it can begin processing.
|
List |
query(WorkflowExpressionQuery query)
Query the workflow store for matching instances
|
List |
query(WorkflowQuery query)
Deprecated.
use
query(WorkflowExpressionQuery) instead. |
boolean |
removeWorkflowDescriptor(String workflowName)
Remove the specified workflow descriptor.
|
boolean |
saveWorkflowDescriptor(String workflowName,
WorkflowDescriptor descriptor,
boolean replace)
Add a new workflow descriptor
|
void |
setConfiguration(Configuration configuration)
Set the configuration for this workflow.
|
static final String BSF_COL
static final String BSF_LANGUAGE
static final String BSF_ROW
static final String BSF_SCRIPT
static final String BSF_SOURCE
static final String BSH_SCRIPT
static final String CLASS_NAME
static final String EJB_LOCATION
static final String JNDI_LOCATION
int[] getAvailableActions(long id)
getAvailableActions(long, Map)
with an empty Map instead.List getCurrentSteps(long id)
id
- The workflow instance id.int getEntryState(long id)
id
- The workflow instance id.List getHistorySteps(long id)
id
- The workflow instance id.Step
com.opensymphony.module.propertyset.PropertySet getPropertySet(long id)
id
- The workflow instance id.List getSecurityPermissions(long id)
getSecurityPermissions(long, java.util.Map)
with a null map instead.id
- the workflow instance id.List getSecurityPermissions(long id, Map inputs)
id
- id the workflow instance id.inputs
- inputs The inputs to the workflow instance.WorkflowDescriptor getWorkflowDescriptor(String workflowName)
workflowName
- The workflow name.String getWorkflowName(long id)
id
- the workflow instance id.boolean canInitialize(String workflowName, int initialStep)
workflowName
- The name of the workflow to check.initialStep
- The id of the initial state to check.boolean canModifyEntryState(long id, int newState)
id
- The workflow instance id.newState
- The new state id.void changeEntryState(long id, int newState) throws WorkflowException
id
- The workflow instance id.newState
- the new state to change the workflow instance to.
If the new state is com.opensymphony.workflow.spi.WorkflowEntry.KILLED
or com.opensymphony.workflow.spi.WorkflowEntry.COMPLETED
then all current steps are moved to history steps. If the new state isWorkflowException
void doAction(long id, int actionId, Map inputs) throws InvalidInputException, WorkflowException
id
- The workflow instance id.actionId
- The action id to perform (action id's are listed in the workflow descriptor).inputs
- The inputs to the workflow instance.InvalidInputException
- if a validator is specified and an input is invalid.InvalidActionException
- if the action is invalid for the specified workflow
instance's current state.WorkflowException
void executeTriggerFunction(long id, int triggerId) throws WorkflowException
id
- The workflow instance idtriggerId
- The id of the speciail trigger-functionWorkflowException
long initialize(String workflowName, int initialAction, Map inputs) throws InvalidRoleException, InvalidInputException, WorkflowException, InvalidEntryStateException, InvalidActionException
workflowName
- The workflow name to create and initialize an instance forinitialAction
- The initial step to start the workflowinputs
- The inputs entered by the end-userInvalidRoleException
- if the user can't start this functionInvalidInputException
- if a validator is specified and an input is invalid.InvalidActionException
- if the specified initial action is invalid for the specified workflow.WorkflowException
InvalidEntryStateException
List query(WorkflowQuery query) throws WorkflowException
query(WorkflowExpressionQuery)
instead.WorkflowException
List query(WorkflowExpressionQuery query) throws WorkflowException
WorkflowException
int[] getAvailableActions(long id, Map inputs)
id
- The workflow instance id.inputs
- The inputs map to pass on to conditionsIllegalArgumentException
- if the specified id does not exist, or if its workflow
descriptor is no longer available or has become invalid.void setConfiguration(Configuration configuration)
configuration
- a workflow configurationString[] getWorkflowNames()
boolean canInitialize(String workflowName, int initialAction, Map inputs)
workflowName
- The workflow name to check.initialAction
- The potential initial action.inputs
- The inputs to check.boolean removeWorkflowDescriptor(String workflowName) throws FactoryException
workflowName
- The workflow name of the workflow to remove.FactoryException
- If the underlying workflow factory has an error removing the workflow,
or if it does not support the removal of workflows.boolean saveWorkflowDescriptor(String workflowName, WorkflowDescriptor descriptor, boolean replace) throws FactoryException
workflowName
- The workflow name of the workflow to adddescriptor
- The workflow descriptor to addreplace
- true, if an existing descriptor should be overwrittenFactoryException
- If the underlying workflow factory has an error adding the workflow,
or if it does not support adding workflows.Copyright © 2021 catworkx GmbH. All rights reserved.