|In this tutorial we will learn how to configure and use Shared Variable.
In this a single slot of memory is allocated to store the data which is used by all process instances to read or update. Thus every new instance will have access to the updated set of information.
|In this tutorial we will create a BW process as shown in the images below.
1.1 First Create a Shared Variable
Initial Value Tab
|1.2 Create below design with specified configuration
|1.3 Pre-run configuration
Before running the BW process we need to set the input as “5” to the starter activity. We can do this by selecting the Start process and hit F12. The below dialog will open.1.4 Running Bw process
On running the BW process for first time the GetVariable activity will get the predefined value as “1” and SetVariable will set the value as “5” in Shared Variable.
Re-set the Start activity value to “15”
On running the BW process for the second time the GetVariable will get the updated value from Shared Variable that is “5”.
Every new process instance created will get the latest set value.
Note: If we will stop BW process testing and re-run it, the value fetched by GetVariable will the last updated value “15” before stopping the process instead of predefined value “1” since we are using persistent property in Share Variable.