Shared variable values is accessed and modified across different job instances. While job shared variable is different for different jobs. A Job Shared Variable is created for a particular job. If there are ten jobs currently running, then each one carries its own instance of the Job Shared Variable.It works some thing like Job shared variable behaves like instance variable and shared variable is works like static variable in your java class.
Shared Variable :
A Shared Variable resource allows you to share data across process instances. All process instances can read and update the data stored in a shared variable. Example For Shared variable: You wanna have track of how many times a user hits ur website. (We have many options, this is just for understanding). When ever a call is made using Http , your porcess is triggered. When you have Shared Varible initally configured as Zero and increment it each time when the process is triggered. Note: Job shared variable cannot do this as for each instance a new copy is created.
Job Shared Variable :
A Job Shared Variable shared configuration resource allows you to store data for use by each process instance. A copy of the variable is created for each new process instance. This resource is useful for passing data to and from sub-processes without creating an input or output schema for the called process. Example for Job shared variable. You have written a common PD for validating some stuff, and this PD is called by many PDs.. Using GET\SET variables you store some data in Job shared variable. Now only parent process(which is calling this ) can access this data and not all. In this Scenario using a shared variable will be of no use. This can be easily done using mapping data into call process. But this is just an example.
No comments:
Post a Comment