In the Project Explorer view, double-click
Shared Variables under the
Module Descriptors to open the
Shared Variables tab.
Two panes are displayed:
Module Shared Variables
Job Shared Variables
Click one of the following icons in the respective sections to define a module shared variable or a job shared variable:
- Add a complex element. You can choose from an existing schema declaration or create a new schema.
- Add a simple element.
In the Properties view, provide the information as described in the following table.
Name of the shared variable
After adding a complex or simple element, specify the Module Data type for the shared variable to use by selecting one of the following options from the drop-down menu:
By default, the value of a module shared variable is stored in memory and the current state of the module shared variable would be lost in case the engine crashes.
Select the check-box to persist the current value of the module shared variable. The current state of the variable in the engine's persistent storage is only updated when the value of the variable changes.
Note: The engine persistence must be configured for the current value of the module shared variable to persist.
Note: This check-box only displays when configuring module shared variables. Job shared variables cannot be configured to be persistent.
Description for the shared variable.
Initial Value Tab
Enter an initial value for the shared variable. Select one from the following options:
None: Specifies that no initial value is set for the shared variable. Ensure that you set the value using the
Set Shared Variable activity in the business process before you retrieve the value of the variable using the
Get Shared Variable activity.
Select Value: Select this option to browse and select a file containing the initial value for the shared variable.
Build Value: Select this option to enter an initial value for the shared variable.
Retrieving and Assigning a Value of a Shared Variable
To retrieve the value of a shared variable, use the
Get Shared Variable activity in the General Activities palette. To assign a value to a shared variable, use the
Set Shared Variable activity in the General Activities palette.