Jobs are moving to DEFERRED state when we try to link multiple jobs out links to a specified job.
Diyotta doesn’t have Try and Catch sort of functionality and during our prior discussions we were told to use link conditions in order to implement logic on failure. So I did below ( see screen shot).
- All top link are on status=’SUCCEDED’ and indicates successful execution path
- All bottom links are status=’FAILED’ to indicate failure path.
Expectation is if any transform stage fails then you go to failure path because that respective link condition is met. However as you see in Monitor screen, it didn’t work as I expected. DBCommand_ris_job_status failed but still last three transforms remained deferred.
I think one reason for this is if we have multiple incoming links to a transform (e.g.DBCommand_ris_job_fail) then ALL of link conditions must be met before it is run.
There are very limited transforms that I can use in job flow. I don’t understand how can I tell diyotta to execute DBCOmmand_ris_job_fail even if one of the incoming link condition is met like OR operation.
For this used case, do below.
- Connect all the bottom links to a command task. In the command task write a simple script to evaluate the status of the jobs to ‘FAILED’.
If [ “job1.status” == “FAILED” ]
if [ “job2.status” == “FAILED” ]
<add other statuses>
- Link this command task to the dbcommand and in the link condition check the return code from the command task. Check if the return code is 0 in the link condition.
Commandtask.returncode = 0
- In all the bottom links give the link condition as jobstatus = COMPLETED || jobstatus = DEFERRED. So that the link is satisfied even if the job runs or does not run.