Package com.opensymphony.workflow.loader
Class WorkflowDescriptor
java.lang.Object
com.opensymphony.workflow.loader.AbstractDescriptor
com.opensymphony.workflow.loader.WorkflowDescriptor
- All Implemented Interfaces:
Validatable,XMLizable,Serializable
- Direct Known Subclasses:
ImmutableWorkflowDescriptor
Describes a single workflow
- Author:
- Pat Lightbody
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.WorkflowDescriptor(Element root) Deprecated.useDescriptorFactoryinstead -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommonAction(ActionDescriptor descriptor) Add a common actionvoidaddGlobalAction(ActionDescriptor descriptor) Add a global actionvoidaddInitialAction(ActionDescriptor descriptor) Add an initial actionvoidaddJoin(JoinDescriptor descriptor) Add a joinvoidaddSplit(SplitDescriptor descriptor) Add a splitvoidaddStep(StepDescriptor descriptor) Add a stepgetAction(int id) Get a Map of the common actions specified, keyed on actionId (an Integer)Get a List of the global actions specifiedgetInitialAction(int id) Get a List of initial steps for this workflowgetJoin(int id) getJoins()Get a List of initial steps for this workflowgetName()getSplit(int id) Get a List of initial steps for this workflowgetStep(int id) getSteps()Get a List of steps in this workflowgetTriggerFunction(int id) Get a Map of all trigger functions in this workflowprotected voidbooleanremoveAction(ActionDescriptor actionToRemove) Remove an action from this workflow completely.voidsetTriggerFunction(int id, FunctionDescriptor descriptor) Update a trigger functionvoidvalidate()Validate this element, and propagate validation to all contained sub-elements.voidwriteXML(PrintWriter out, int indent) Methods inherited from class com.opensymphony.workflow.loader.AbstractDescriptor
asXML, getEntityId, getId, getParent, hasId, setEntityId, setId, setParent
-
Field Details
-
XML_HEADER
- See Also:
-
DOCTYPE_DECL
- See Also:
-
globalConditions
-
commonActionsList
-
globalActions
-
initialActions
-
joins
-
registers
-
splits
-
steps
-
commonActions
-
metaAttributes
-
timerFunctions
-
workflowName
-
-
Constructor Details
-
WorkflowDescriptor
public WorkflowDescriptor()Deprecated.useDescriptorFactoryinstead -
WorkflowDescriptor
Deprecated.useDescriptorFactoryinstead
-
-
Method Details
-
getAction
-
getCommonActions
Get a Map of the common actions specified, keyed on actionId (an Integer)- Returns:
- A list of
ActionDescriptorobjects
-
getGlobalActions
Get a List of the global actions specified- Returns:
- A list of
ActionDescriptorobjects
-
getGlobalConditions
-
getInitialAction
-
getInitialActions
Get a List of initial steps for this workflow- Returns:
- A list of
ActionDescriptorobjects
-
getJoin
-
getJoins
Get a List of initial steps for this workflow- Returns:
- A list of
JoinDescriptorobjects
-
getMetaAttributes
-
setName
-
getName
-
getRegisters
-
getSplit
-
getSplits
Get a List of initial steps for this workflow- Returns:
- A list of
SplitDescriptorobjects
-
getStep
-
getSteps
Get a List of steps in this workflow- Returns:
- a List of
StepDescriptorobjects
-
setTriggerFunction
Update a trigger function- Parameters:
id- The id for the trigger functiondescriptor- The descriptor for the trigger function- Returns:
- The old trigger function with the specified ID, if any existed
-
getTriggerFunction
-
getTriggerFunctions
Get a Map of all trigger functions in this workflow- Returns:
- a Map with Integer keys and
FunctionDescriptorvalues
-
addCommonAction
Add a common action- Parameters:
descriptor- The action descriptor to add- Throws:
IllegalArgumentException- if the descriptor's ID already exists in the workflow
-
addGlobalAction
Add a global action- Parameters:
descriptor- The action descriptor to add- Throws:
IllegalArgumentException- if the descriptor's ID already exists in the workflow
-
addInitialAction
Add an initial action- Parameters:
descriptor- The action descriptor to add- Throws:
IllegalArgumentException- if the descriptor's ID already exists in the workflow
-
addJoin
Add a join- Parameters:
descriptor- The join descriptor to add- Throws:
IllegalArgumentException- if the descriptor's ID already exists in the workflow
-
addSplit
Add a split- Parameters:
descriptor- The split descriptor to add- Throws:
IllegalArgumentException- if the descriptor's ID already exists in the workflow
-
addStep
Add a step- Parameters:
descriptor- The step descriptor to add- Throws:
IllegalArgumentException- if the descriptor's ID already exists in the workflow
-
removeAction
Remove an action from this workflow completely.This method will check global actions and all steps.
- Returns:
- true if the action was successfully removed, false if it was not found
-
validate
Description copied from interface:ValidatableValidate this element, and propagate validation to all contained sub-elements. Should throw an InvalidWorkflowDescriptorException with details in message if the element is invalid. Validity checks should be checks that cannot be encapsulated in the DTD. Validation has to be called explicitly on writting, a writeXML() does not validate implicitly; it *IS* thus possible to write invalid descriptor files. This could be useful for e.g. a graphical workflow definition editor which would like to write incomplete definitions. Validation *IS* performed on loading a workflow definition.- Specified by:
validatein interfaceValidatable- Throws:
InvalidWorkflowDescriptorException- See Also:
-
writeXML
-
init
-
DescriptorFactoryinstead