For each business process definition (BPD) or service that
you create, you must declare variables to capture the business data
that activities in that BPD or steps in that service use.
Before you begin
If you are declaring variables for a BPD, open the
IBM® Process
Designer desktop
editor.
About this task
You can add the following variables to your BPDs:
Table 1. Variables available for addition to business process definitionsVariable |
Description |
Private |
Local variables that are used only within the
process. |
Input |
Variable that represents input data passed to
the current BPD or service. |
Output |
Variable that represents output data that the
current BPD or service returns to its caller. |
Exposed process variable (EPV) |
Special type of variables that you can create
to set or alter values while instances of a process are running. |
Only
BPD variables that are marked as process instance identifiers can
be used for instance-based correlation of intermediate message events
that use the SCA triggering mechanism. A process instance identifier
variable can be a private, input, or output variable, and can be a
simple or complex variable type.
Procedure
If you want to add an exposed process variable, click Link
EPV, and then select the EPV from the list. If you want
to add a private, input, or output variable, complete the following
steps:
- Open your BPD or service diagram in Process Designer.
- In the Variables tab, click Add
Private, Add Input, or Add
Output to create the corresponding variable.
- In the Details section:
- Type a variable name in the Name field.
Note: Variable names start with a lowercase letter, with subsequent
words capitalized, for example: myVar. Do not use
underscores or spaces in variable names. Variable names are case-sensitive.
- Click Select next to the Variable
Type field to select the type of the variable. Custom
business objects that you created are also listed.
- Optional: Type a description of the variable
in the Documentation field.
- Optional: If you want your variable to be
an array, select Is List.
- Optional: To set a default value for the variable,
in the Default Value section, select Has
Default, and enter the value in the corresponding field.
- Optional: To include the BPD variable in the
business data that users can view in Process Portal, in
the Business Data section, select Visible
in Process Portal, and type an alias in the Alias field.
Tip: The search alias must be unique to the variable
type throughout the process server on which the BPD runs. If a variable
is used in parent and nested processes, use the same search alias
if you want search results to include all related processes.
- Optional: To include the BPD variable values
in the data that is collected and used to create reports, in the Performance
Tracking section, select Track this Field.
- To declare a BPD variable as a secondary process identifier,
you must mark it as a process instance identifier. In the Process
Identification section, select Variable is
used as Process Instance Identifier. While it is possible
to mark any variable as process instance identifier, it is advisable
to use a variable for this purpose that is not too complex.
Important: The value that is written to the variable must be
unique for each instance of the BPD. Because variables that are selected
as process instance identifiers can be written to only once, be careful
during initialization, data mapping, pre-assignments, and post-assignments
to avoid it ever being written to twice for an instance. Writing any
value to such a variable more than once causes an error.
Tip: If you clear the selection for a variable that is already
used for correlation, the variable is marked with an error icon on
the Data Mapping tab.
Variables
that are marked as process instance identifiers can be selected to
be used for correlation, and are indicated in variable selection dialogs
by the text [Identifier].
- To save the configuration, click Save in
the main toolbar.
What to do next
The BPD or service includes variables that can be passed
to activities or services, by mapping input and output variables.
If you have a coach in the diagram, the variables are directly available
inside the diagram, and can be dragged in the layout window.