Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
android1686764069
Contributor
Contributor

How can I get a boolean value from a child and test it to start next child job

Hello

I have 2 children job in a my parent job

childA et childB

child A returns a boolean value

0695b00000qPfCBAA0.png

Then in parent job, i have someting like this:0695b00000qPfPKAA0.png

How can i get the boolean value from child A and test if in the run if row?

Labels (2)
3 Replies
act
Contributor
Contributor

Hello,

In the parentJob, in the tRunJob component, click on the button " copy Child Job Schema" .

 

As I understand your case, the schema of the tBufferOutput_1 in childA must be only one colum of boolean type.

 

"copy Child Job Schema" will create a schema in The tRunJob, same as the schema of the tBufferOutput_1 in childA (i.e. one column of boolean type)

 

At runtime, the flow from the tBufferOutput in ChildA can then be caught in the parent job, with a main connexion out of the tRunJob ChildA

 

Then you could for instance put the values the in the globalMap (with tFlowToIterate or tSetGlobalVar or tJavaRow...) and test it in the RunIf connexion -> ChildB.

You could of course, send several values (more columns) and several lines, depending of what data you send to tBufferOutput

 

Anne Céline

android1686764069
Contributor
Contributor
Author

Yes in my case, childA output is only a single value, so it's one column of boolean type in tbufferoutput

 

So in my parent job, between childA en childB I need to add a component such as tSetGlobalVar. I'll try monday. thank you

Anonymous
Not applicable

After you return the value from child job, you need to assign it to a context variable or global variable for used later,

eg:

tRunJob1--main--tJavaRow--runIf--tRunJob2

on tJavaRow:

context.varName=input_row.columnName;

 

Then, you can use the context variable directly as the condition of runIf connector.