August 15, 2023

Set the components – Docs for ESB 6.x

Set the components

In this example, the value set in the parent Job is transferred to the child Job.
There, it is modified and adopts the value of the child Job, and then transferred to
the parent Job again.

  1. In parentJob, select the tSetEnv component and click the Component tab. Add a variable row by clicking the
    [+] button to set the initial value of
    the variable. Type Variable_1 in the
    Name field, and Parent job value in the Value field.
  2. Select the first tMsgBox component, and click
    the Component tab. In the Message field, type the message displayed in the
    info-box which confirms that your variable has properly been taken into
    account. For example:
    "Parent:"+System.getProperty("Variable_1") displays the
    variable set in the tSetEnv component (here
    Parent job value).
  3. Select the second tMsgBox component, and
    click the Component tab. In the Message field, type the
    "Parent:"+System.getProperty("Variable_1") line again. It
    makes the variable set in the child Job appear.
  4. Select the tRunJob component and click the
    Component tab. In the Job field, type the name of your child Job, here
    ChildJob. This will run the child Job
    when you run the parent Job.

    use_case-tsetenv3.png

  5. Now double-click the tRunJob component to open the
    child Job ChildJob.
  6. Select the tSetEnv component, and click the
    Component tab. Add a variable row by
    clicking the [+] button to set the initial
    value of the variable. Type Variable_1 in
    the Name field, and Child job value in the Value field.
  7. Select the tMsgBox component and click the
    Component tab. In the Message field, type the message displayed in the
    info-box which confirms that your variable has properly been taken into
    account. For example: "Son:"+System.getProperty("Variable_1")
    displays the variable set in the tSetEnv
    component (here Child job value).

    use_case-tsetenv4.png

  8. Save your Job, go back to parentJob, then
    run the Job by pressing F6.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x