Step Elements
Note
Similar to variables, some parts of a step definition are included as attributes of the step and others are expressed as nested elements within the step.
The core of the workflow is contained within the step elements. The action attribute determines what processing the step performs. Steps usually contain one or more nested <Transition>
elements and ideally also contain a nested <Description>
element that tells the reader what the step is intended to do. At a minimum, a step should contain:
-
an icon
-
name
-
posX attribute
-
posY attribute
The action attribute determines what processing the step performs. Steps usually contain one or more nested <Transition>
elements and ideally also contain a nested <Description>
element that tells the reader what the step is intended to do.
<Step icon="Start" name="Start" posX="250" posY="126">
<Description>
The workflow's processing starts with this step.
</Description>
<Transition to="Initialize"/>
</Step>
Step Attributes
Step Attribute | Purpose |
---|---|
configForm | A soft reference to the form that is presented to the Basic View of the Arguments tab on the Step Editor panel. |
name | Short but descriptive name for step displayed in user interface graphical display below the step icon. |
icon | Icon to display for the step in the user interface graphical Process Designer. Valid icon values include: Start, Stop, Default (Generic Step), Analysis (Launch Impact Analysis), Approval, Audit, Catches, Email, Message (Add Message), Provision, Task (Launch Task), and Und |
posX, posY | X and Y indicate positions where the step icon should be displayed on the user interface graphical Process Designer grid. If you omit the posX and posY values, the icon is displayed at the top right of the grid. You can drag the icon around to create the desired layout at a later time. |
action | The processing action to take for the step, such as a script, rule, subprocess, or call. See Step Actions(LINK IN DOC). |
wait | Pauses the action for a specified duration, see Wait Attribute(LINK IN DOC). |
catches | Causes the step to be launch when Complete status is caught, rather than through a transition from another step. See Catches Attribute(LINK IN DOC). |
resultVariable | Variable name that contains the return value from the step. |
Nested Tag within Step Element | |
Description | Provide a description of the step purpose. |
Transition | Identifies the next step the process moves to when the current step is complete. See Transition Element(LINK IN DOC). |
Arg | Passes variables to the step. Used for steps that require data to be passed in to them. |
Return | Receives return values from subprocess steps. See Return Elements(LINK IN DOC). |
Script | Alternative to script in the Action attribute for the step. Use these step attributes for action scripts of any length or complexity. |
Source | Nested within the Script tag and contains the Java BeanShell source for the action to execute. |
Transition Element
The transition element indicates the name of the next step the process executes following completion of the current step and is always nested within a step in the model. Transitions can contain conditions based on a string, script, rule, call method, or reference (similar to a variable initialization). The return value for conditions must be a Boolean (True / False). When multiple transitions are stipulated, they are evaluated in the order they are listed, and the transition for the first condition met is followed. The last transition in the list should, as a best practice, not contain any conditions so it can be used as the default action.
Transitions contain two attributes:
-
to – next step
-
when – condition for progressing to the next step
When a script is evaluated as the condition for a transition, it is often specified through these nested elements instead of as a when attribute on the transition element, especially if you use a long script.
Nested Tag Within Transition Element | Purpose |
---|---|
Script | Alternative to script in the transition when attribute. The script should be used for scripts of any length or complexity. |
Source | Nested within the Script tag. This tag contains the BeanShell source for the condition evaluation. |
Example:
<Transition to="end">
<Script>
<Source>
("cancel".equals(violationReviewDecision) || ((size(policyViolations)
> 0 ) && (policyScheme.equals("fail"))))
</Source>
</Script>
</Transition>
Conditions in the when attribute can be specified using the following types of conditions:
|
Condition Type
|
Description and Examples
| | --- | --- | |
string
|
Not used. This condition type is an artifact of the common structure used for variable setting and does not apply to conditions. A literal value of True or False can be specified. However, using one of those literal values does not enable any evaluation in the transition. True always executes the associated step and False always bypasses the step.
script
|
Evaluates script result value to determine step transition. Very short scripts are specified inline on the transition element, within the when attribute. Longer scripts are expressed within nested
rule
|
Evaluates the return value of a workflow rule to determine step transition.
Examples:
call
|
Evaluates return value of a call to a workflow library method to determine step transition.
Example:
ref
|
Evaluates a defined, Boolean, workflow variable to determine step transition.
Example:
Unconditional
|
Specified as last transition option to give a default path for the transition.
Example:
|