0

I am passing some values Jenkins to Talend to run job.

I would like to run different sub job if there is one input value and another job if there are 3 input values.

Is there a way I can do that in Talend ?

jmf
  • 356
  • 5
  • 25

1 Answers1

1

Use a tJava to analyze / verify how many parameters / input values you have, create a global variable that holds the type of the job, then using if links trigger the right job using tRunJob ((String)globalMap.get("jobToRun")).equals("single")

Balazs Gunics
  • 2,017
  • 2
  • 17
  • 24
  • I did this way too. This can also work with conditionaly choosing sub components I suppose? – jmf Apr 29 '19 at 12:54
  • Yes it can work for that too. Just make sure you're not really modifying this value afterwards. (I.e you trigger the single job, then modify it to multi and once the single is complete the value will have multi so that runs too.) – Balazs Gunics Apr 30 '19 at 13:32