|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.fulcrum.osworkflow.WorkflowInstance
WorkflowInstance represents a specific instance of a workflow. Therefore it has all the context information like what state it is in, what it's actions are etc.
Constructor Summary | |
WorkflowInstance(Workflow workflow,
long id)
Simple constructor to create a workflow instance with the workflow, and the id of an instance of the workflow. |
Method Summary | |
boolean |
canInitialize(java.lang.String workflowName,
int initialStep)
|
boolean |
canModifyEntryState(int step)
Whether you can modify the entry state of this workflow instance |
void |
changeEntryState(int entryState)
Modify the state of the specified workflow instance. |
void |
doAction(int actionId,
java.util.Map inputs)
Perform an action on the the workflow instance. |
boolean |
equals(java.lang.Object obj)
Returns whether another workflow equals this workflow. |
void |
executeTriggerFunction(int triggerId)
Executes a special trigger-function using the context of the workflow instance. |
java.util.List |
getAllAvailableActions()
Get the available actions for the workflow instance. |
int[] |
getAvailableActions(java.util.Map inputs)
Get the available actions for the workflow instance. |
java.util.List |
getCurrentSteps()
Returns a Collection of Step objects that are the current steps of the workflow instance. |
int |
getEntryState()
Return the state of the workflow instance. |
java.util.List |
getHistorySteps()
Returns a list of all steps that are completed for the workflow instance. |
long |
getId()
|
com.opensymphony.module.propertyset.PropertySet |
getPropertySet()
Get the PropertySet for the workflow instance. |
java.util.List |
getSecurityPermissions()
Get a collection (Strings) of currently defined permissions for the workflow instance. |
WorkflowDescriptor |
getWorkflowDescriptor()
Get the workflow descriptor for the workflow instance. |
java.lang.String |
getWorkflowName()
Get the name of the specified workflow instance. |
int |
hashCode()
|
java.util.List |
query(WorkflowQuery query)
Execute a workflow query and returns the list of workflows |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WorkflowInstance(Workflow workflow, long id)
workflow
- The workflow this instance belongs toid
- The id of this workflow instanceMethod Detail |
public long getId()
public boolean canInitialize(java.lang.String workflowName, int initialStep) throws WorkflowException
WorkflowException
- If there is a problempublic boolean canModifyEntryState(int step) throws WorkflowException
WorkflowException
- If there is a problempublic void changeEntryState(int entryState) throws WorkflowException
entryState
- the new state to change the workflow instance to.
WorkflowException
- If a problem occurspublic void doAction(int actionId, java.util.Map inputs) throws InvalidInputException, WorkflowException
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.
WorkflowException
- If a problem occurspublic boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
public void executeTriggerFunction(int triggerId) throws WorkflowException
triggerId
- The id of the special trigger-function
WorkflowException
- If there is a problempublic int[] getAvailableActions(java.util.Map inputs) throws WorkflowException
inputs
- The inputs map to pass on to conditions
java.lang.IllegalArgumentException
- if the specified id does not exist, or if its workflow
descriptor is no longer available or has become invalid.
WorkflowException
- If there is a problempublic java.util.List getCurrentSteps() throws WorkflowException
WorkflowException
- If there is a problempublic int getEntryState() throws WorkflowException
WorkflowException
- If there is a problempublic java.util.List getHistorySteps() throws WorkflowException
WorkflowException
- If there is a problemStep
public com.opensymphony.module.propertyset.PropertySet getPropertySet() throws WorkflowException
WorkflowException
- If there is a problempublic java.util.List getSecurityPermissions() throws WorkflowException
WorkflowException
- If there is a problempublic WorkflowDescriptor getWorkflowDescriptor() throws WorkflowException
WorkflowException
- If there is a problempublic java.lang.String getWorkflowName() throws WorkflowException
WorkflowException
- If there is a problempublic int hashCode()
Object.hashCode()
public java.util.List query(WorkflowQuery query) throws WorkflowException
query
- The workflow query
WorkflowException
- If there is a problempublic java.lang.String toString()
Object.toString()
public java.util.List getAllAvailableActions() throws WorkflowException
java.lang.IllegalArgumentException
- if the specified id does not exist, or if its workflow
descriptor is no longer available or has become invalid.
WorkflowException
- If there is a problem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |