One Star

Finding all references to job in tRunJob

Is there a way to identify all jobs that reference a certain job via a tRunJob?


For example, I have 5 jobs:

1) StandaloneMain1 (tJava -> tRunJob (Process1) -> tRunJob (Process2) -> tRunJob(Process_Send_Notification) tSendMail)

2) Process1 (tJava -> tRunJob(Process_Send_Notification) -> Some SQL)

3) Process2 (tJava -> tRunJob(Process_Send_Notification) -> Some SQL)

4) StandaloneMain2 (tJava -> tRunJob(Process_Send_Notification) -> Some SQL)

5) Process_Send_Notification (tRest for API integration)


If I make a change in Process_Send_Notification, I need to rebuild and deploy both StandaloneMain1 and StandaloneMain2. If I make a change in Process1, I need to rebuild and deploy StandaloneMain1. Is there an easy way to find what jobs I would need to build for Process_Send_Notification without having knowledge of the whole project? The example above is a much smaller example of projects with many components. 



  • Data Integration
Tags (1)
Seven Stars

Re: Finding all references to job in tRunJob

This would be a nice feature and I am not aware it exists....yet (although I may be wrong). I have got round this and many similar questions regarding what has been used and how within a project, by making use of the fact that the jobs are stored in an XML format.


If you look in the workspace and inside your project folder, you will see a "process" folder. Inside that you will see your jobs folder structure. Each job is made up of 3 files (.properties, .item and .screenshot). The files you are interested in are .item files. Before you do anything else take a copy of your project folder and move it somewhere else!! If you break the files and/or folder structures in the workspace, you will end up in a lot of trouble. So in order to not run the risk of issues, take a copy and work on the copy. Once you have your copy, open a .item file from your copy and take a look at the structure. It is pretty straight forward. What you will need to look for is how the .item file holds the trunjob and its reference to the job that it is running. Once you have figured that out (it's not terribly hard) then you can use that to find other jobs that have that same piece of XML. Then all it takes is for you to build a job to analyse ALL .item files and to log which of the files has that bit of XML. 

This is exactly the process I use for finding certain characteristics within my jobs. I have even been known to edit the XML in order to implement a change across all jobs in my project but this is NOT supported and can lead to big issues if you break something!



I hope this gives you a few ideas but please remember to work on a copy!

Rilhia Solutions