Difference between OnSubJobOk and OnComponentOk

One Star

Difference between OnSubJobOk and OnComponentOk

What is the difference?
One Star

Re: Difference between OnSubJobOk and OnComponentOk

Hi
OnSubJobOk and OnComponentOk are the same apparently.
But in java source code, they are defined with different logic.
Here is an example.
You need to regard tRowGenerater--OnComponentOk-->tJavaFlex as a subjob.
In the end, you will find the 'OnComponentOk' tJava_2 will execute while the 'OnSubjobOk' tJava_1 won't.
Best regards!
Pedro
One Star mpa
One Star

Re: Difference between OnSubJobOk and OnComponentOk

Jack Black,
OnComponentOk: This link will be executed when 1 Component has succesfully executed.
OnSubjobOk: This link will be executed when a whole "SubJob" has been executed. This can be multiple components in a flow. In a job you can have different subjobs, you can see what's a subjob when there is a background. The components will be in a sort of box.
For example:
You want to read a file into a database and when the file has been inserted in the database you want to sent a mail.
tFileDelimitedInput --> tMap --> TMssqlOutput
|
|OnSubJobOk
|
tSendMail
What this will do is execute the subjob first which are the three component at the top to read the file and insert in the database. Once that's done the Subjob will be completed and it will execute the tSendMail component.

When you only have one component a OnComponentOk and OnSubJobOk link will do the same. Because one component is considered a subjob when it's not linked to any other components.

Regards
Six Stars

Re: Difference between OnSubJobOk and OnComponentOk


The main difference between OnSubjobOK and OnComponentOK is in the execution order of the linked subjob. 
With OnSubjobOK, the linked subjob starts only when the previous subjob completely finishes.
With OnComponentOK, the linked subjob starts when the previous component finishes.