Returning codes from a child job without tDie
In this recipe we will show how return codes can be set in a child job and used in a parent, without having to kill the child process.
Getting ready
Open the job jo_cook_ch11_0060_childReturnCodesNoDie
. This job is the end state of the previous recipe.
How to do it…
The first thing we need to do is add the return code value to a buffer for the parent job to pick up.
Buffering the return code
- Open
task_1
and replace thetDie
component with atFixedFlowInput
component. - Add an
Integer
column to thetFixedFlowInput
component calledreturnCode
. - Set the value to
4
. - Add a
tBufferOutput
component and add a flow from thetFixedFlowInput
component to it.Capturing and storing the return code in the parent
- Return to the ...
Get Talend Open Studio Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.