One Star

[resolved] Running a subjob onsubjoberror OR onsubjobok without repeating twice?

I would like to be able to run a subjob after a component regardless if the component has succeded or failed.
Currently I use both a OnSubjobOk and a OnSubjobError from the component in question to the same subjob, like this:


The problem with this approach is that it looks messy. Given that there is not a "OnSubjobOk_OR_OnSubjobError" trigger, is there a workaround I can use to implement what I'de like?
I attempted a "run if" trigger, where the condition was true == true. This worked if the component in question was a subjob or component that had a "Die on child error" check box, if I left he check box unchecked. It however did not work for components lacking a "Die on child error" check box, such as tJava.
Regards,
Matthew Moisen
1 ACCEPTED SOLUTION

Accepted Solutions
Seventeen Stars

Re: [resolved] Running a subjob onsubjoberror OR onsubjobok without repeating twice?

Connect both triggers (OnSubjobOk and OnSubjobError) to a tJava(_2 and _3) (without any code).
Now connect from each tJava with OnComponentOk to your target component (e.g. the tRunJob).
2 REPLIES
Seventeen Stars

Re: [resolved] Running a subjob onsubjoberror OR onsubjobok without repeating twice?

Connect both triggers (OnSubjobOk and OnSubjobError) to a tJava(_2 and _3) (without any code).
Now connect from each tJava with OnComponentOk to your target component (e.g. the tRunJob).
One Star

Re: [resolved] Running a subjob onsubjoberror OR onsubjobok without repeating twice?

You may also using a "run if" trigger and set the condition to "true"