|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infoglue.cms.util.workflow.WorkflowFacade
public class WorkflowFacade
A facade to OSWorkflow that gives us a place to cache workflow data as we need it while interacting with it. This class has kind of a strange interface due to the idiosyncracies of the OSWorkflow, particularly the Workflow interface. The idea is to encapsulate the interactions with OSWorkflow and eliminate the need to pass a Workflow reference and the workflow ID all over the place when extracting data from OSWorkflow
| Constructor Summary | |
|---|---|
WorkflowFacade(InfoGluePrincipal userPrincipal)
Constructs a WorkflowFacade with the given user principal |
|
WorkflowFacade(InfoGluePrincipal userPrincipal,
long workflowId)
Constructs a WorkflowFacade for a user with the given workflow ID. |
|
WorkflowFacade(InfoGluePrincipal userPrincipal,
java.lang.String name,
int initialAction)
Constructs a WorkflowFacade with the given user principal representing an initialized instance of the workflow with the given name. |
|
WorkflowFacade(InfoGluePrincipal userPrincipal,
java.lang.String name,
int initialAction,
java.util.Map inputs)
Constructs a WorkflowFacade with the given user principal representing an initialized instance of the workflow with the given name. |
|
WorkflowFacade(Owner owner)
Constructs a WorkflowFacade with the given owner. |
|
| Method Summary | |
|---|---|
WorkflowVO |
createWorkflowVO()
Creates a new WorkflowVO. |
void |
doAction(int actionId,
java.util.Map inputs)
Performs an action using the given inputs |
java.util.List |
getActiveWorkflows()
Returns a list of all active workflows. |
java.util.List |
getCurrentSteps()
Returns all current steps for the workflow, i.e., steps that could be performed in the workflow's current state Steps are filtered according to ownership; if a step has an owner, it is only included if the ownser matches the caller or if the current user is an administrator. |
java.util.List |
getCurrentSteps(WorkflowVO workflowVO)
|
java.util.List |
getDeclaredSteps()
Returns all steps for a workflow definition. |
java.util.List |
getDeclaredWorkflows()
Returns a list of all declared workflows, i.e., workflows defined in workflows.xml |
java.util.List |
getHistorySteps()
Returns all history steps for the workflow, i.e., all the steps that have already been performed. |
java.util.List |
getHistorySteps(WorkflowVO workflowVO)
|
java.util.List |
getMyActiveWorkflows(InfoGluePrincipal principal)
Returns a list of workflows owned by the specified principal. |
com.opensymphony.module.propertyset.PropertySet |
getPropertySet()
Returns the property set associated with the underlying workflow |
long |
getWorkflowId()
Returns the workflow ID |
boolean |
isActive()
Indicates whether the underlying workflow is active. |
boolean |
isFinished()
Indicates whether the underlying workflow is finished. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkflowFacade(Owner owner)
owner - the owner of the workflow.public WorkflowFacade(InfoGluePrincipal userPrincipal)
userPrincipal - an InfoGluePrincipal representing a system user
public WorkflowFacade(InfoGluePrincipal userPrincipal,
java.lang.String name,
int initialAction)
throws SystemException
userPrincipal - an InfoGluePrincipal representing a system username - the name of the workflow to createinitialAction - the ID of the initial action to perform to get the workflow started.
SystemException
public WorkflowFacade(InfoGluePrincipal userPrincipal,
java.lang.String name,
int initialAction,
java.util.Map inputs)
throws SystemException
userPrincipal - an InfoGluePrincipal representing a system username - the name of the workflow to createinitialAction - the ID of the initial action to perform to get the workflow started.inputs - a map of inputs to use to initialize the workflow.
SystemException
public WorkflowFacade(InfoGluePrincipal userPrincipal,
long workflowId)
userPrincipal - an InfoGluePrincipal representing a system userworkflowId - the ID representing an instance of the desired workflow| Method Detail |
|---|
public long getWorkflowId()
public void doAction(int actionId,
java.util.Map inputs)
throws com.opensymphony.workflow.WorkflowException
actionId - the ID of the action to performinputs - a map of inputs to the action
com.opensymphony.workflow.WorkflowException - if a workflow error occurs, or if the underlying workflow is not activepublic com.opensymphony.module.propertyset.PropertySet getPropertySet()
public boolean isActive()
throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
public boolean isFinished()
throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowExceptionpublic java.util.List getDeclaredWorkflows()
public java.util.List getActiveWorkflows()
throws SystemException
SystemException - if an error occurs finding the active workflows
public java.util.List getMyActiveWorkflows(InfoGluePrincipal principal)
throws SystemException
principal - the principal.
SystemExceptionpublic java.util.List getCurrentSteps()
public java.util.List getCurrentSteps(WorkflowVO workflowVO)
public java.util.List getHistorySteps()
public java.util.List getHistorySteps(WorkflowVO workflowVO)
public java.util.List getDeclaredSteps()
public WorkflowVO createWorkflowVO()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||