Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In which way I can do it?
I have linked tStatLogCatcher to tJava. In tJava I have: context.pid = input_row.pid, but id does not work
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.
Thank you very much for the explanation! Truly helpul!!