O'Reilly logo

Talend Open Studio Cookbook by Rick Barton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Capturing and acting on different return codes

This recipe shows how we can use the return codes from a child job to control the process flow in a schedule more effectively.

Getting ready

Open the job jo_cook_ch11_0050_ChildReturnCodes. You will see that it is a simpler version of the job from the previous exercise.

How to do it…

We will begin by printing the return code from a child job.

Printing return code

  1. Add a tJava component with the following code:
    System.out.println("Return code is: "+((Integer)globalMap.get("tRunJob_1_CHILD_RETURN_CODE")));
  2. Link from the task to the tJava component using OnSubjobOk.
  3. Run the job—you will see that the return code is 0.

    Setting the return code

  4. Double-click on the child job to open it.
  5. Add a tDie component, and link ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required