Sunday, January 12, 2014

Worked examples of shared variable and job shared Variable in TIBCO BW

Shared Variables:
  • Shared Variable resource allows sharing data across process instances.
  • All process instances can read and update the data stored in a shared variable.
  • Shared variable is useful if a common set of values needs to be passed across all process instances 
Example: A list of approval codes. A shared variable can be created to hold the current list of approval codes and create one process definition for setting the codes. You can then retrieve the shared variable in all processes that require the current approval codes.

Job Shared Variables:
  • A Job Shared Variable resource is similar to a Shared Variable, but data CANNOT be shared across process instances. its scope is limited to the current job (A Job or Instance is nothing but one complete execution from START to END activity in a Process definition).
  • A copy of the variable is created for each new process instance (Variable is Initialized for every Job or Instance ).
  • This type of shared variable is useful for passing data to and from sub-processes without creating an input or output schema for the called process. 
Example: Get Shared Variable and Set Shared Variable activities should be used to access the data instead of mapping data to a called processes input or output schemas. New process instances receive a copy of the Job Shared Variable, so data cannot be shared across process instances.

If a called process has the Spawn configuration field checked, a new process instance is created and the process instance receives a new copy of the Job Shared Variable.


Popular Posts

  © Blogger templates The Professional Template by 2008

Back to TOP