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

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

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).

View solution in original post


All 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).

View solution in original post

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"

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog