This looks like it is getting a bit obfuscated. The pids are very simple. They are also available in ALL jobs. Lets look at a basic job. A single level job.
If you add a tJava in a simple job with the following code....
System.out.println(pid); System.out.println(fatherPid); System.out.println(rootPid);
....they will all print the same thing.
Let's say you have a parent job and a child job. Add the same code in the child job and the rootPid and fatherPid will have the same output, the pid will be different. The pid corresponds to the process id of the actual job that is running. The fatherPid corresponds to the job containing the job that is running. The rootPid corresponds to the top level job that is running.
Top level Job (pid=1234)
Second level Job (pid=5678)
Third level Job (pid=abcd)
Fourth level Job (pid = efgh)
Top level Job's pid = 1234, its fatherPid = 1234 and its rootPid is 1234
Second level Job's pid = 5678, its fatherPid = 1234 and its rootPid is 1234
Third level Job's pid = abcd, its fatherPid = 5678 and its rootPid is 1234
Fourth level Job's pid = efgh, its fatherPid = abcd and its rootPid is 1234
You can access the pid, fatherPid and rootPid easily just by using those variables in all jobs.
You can use pid public vars of your job :
this.pid this.fatherPid this.rootPid
and use it in tjava or assign to tMap columns ...
It works with Talend 6 at least.
(thanks to jordimorato)
PS : I found all this variables who could be utiles :
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables