We have received a few questions regarding replacing objects recently, so I wanted to put together a small thread to show how this can be accomplished and facilitate further discussion. This is V12 specific, but the general process should be very similar across all versions within the Java User Interface.
We need to replace a particular job across all workflows in a client. With this replacement, we require the task properties from the previous job to carry over to the next job.
Initial Setup for Testing:
Java User Interface
Four distinct (copied) workflows
Two job objects (one to be initially placed into the workflows, the other to replace it with)
Within the workflows, we right click and set the task properties in a different manner for each workflow as follows:
Test 1:General tab, Task
Prompts -> Request and Parameter checked || Dependencies tab, Start status
ANY_EXCEPT_FAULT, Else Abort
Test 2: Dependencies tab, At the latest: End: 21:00, TimeZone TZ.PST, Else Block + Abort Signal
Test 3: Earliest Tab, Active not checked || Dependencies tab, Start status = ENDED_OK, Else: Block
Test 4: Earliest tab, Time: 14:00, Active || Dependencies tab, Start status = ANY_ABEND, Else: Skip
Now that our initial test is set up, let’s replace the first job in these workflows with a separate job that does something completely different. In the above simple test case, the first job provides a simple, “dir” command for Windows and the second runs a “ping 127.0.0.1” command. To replace the first, “dir” job, first find the job in Explorer via the User Interface.
Right click on the job and select, “Search/Replace” -> Replace… // This should bring up a new dialog box showing where the job object is utilized, and provide an input section to replace the job with the new, “ping” job. Once the replacement job has been selected, choose the objects you would like to have the job replaced in. To replace in all uses, choose, “Select all” at the bottom-right of this dialog box. Afterwards, select, “Replace…”
If this works as expected, you should see a message stating the following:
U04005690 Processing completed. ‘%’ uses replaced.
Checking the task properties of the replaced job, the expectation is that the task properties have been kept across each replacement.
As always, we’d love to hear feedback and suggestions on how others are accomplishing this requirement. Please feel free to comment below!