How to Pass globalMap variables to all the subJobs in a Job

I am working with multiple jobs that share 50% of same code. I have to update something Every time, I change same thing in all the jobs.
Program1 - Node CBC -> Node a -> Node b -> Node c -> Node XYZ -> Node d -> Node e
Program2 - Node NDT -> Node a -> Node b -> Node c -> Node TUV -> Node d -> Node e
Program3 - Node ZEE -> Node a -> Node b -> Node c -> Node RST -> Node d -> Node e

I want to make them all work like:

Create Sub Job 1, which is combination of Node a -> Node b -> Node c
and
Create Sub Job 2, which is combination of Node d -> Node e

And then rewrite the jobs as following:

Program1 - Node CBC -> Sub Prog 1 -> Node XYZ -> Sub Prog 2
Program2 - Node NDT -> Sub Prog 1 -> Node TUV -> Sub Prog 2
Program3 - Node ZEE -> Sub Prog 1 -> Node RST -> Sub Prog 2

The issue is, the scope of globalMap is limited and in no way it is 'global'. The values created in Node CBC is not accessible within Sub Prog 1. There must be create variables which are accessible everywhere within the job.

Tagged:
Sign In or Register to comment.