Is it possible to use a global variable or a context variable as jobname in a tRunJob component? If yes, how? What I want to do is to have a list of jobs in a file and to execute them sequentially. Thanks Didier
Hi Didier, "Use dynamic job " option allow multiple Jobs to be called and processed. Please refer to the scenario "Running a list of child Jobs dynamically" from component reference:TalendHelpCenter:tRunJob Best regards Sabrina
Thanks Sabrina,
So I have looked the help page and modified my job
but currently I have the following erreor:
Démarrage du job PMI_Schedule a 10:52 21/01/2016.
connecting to socket on port 3630
connected
Exception in component tFlowToIterate_1
job1|Q
job2|M
java.lang.NullPointerException
at pmi.pmi_schedule_0_1.PMI_Schedule.tFileInputExcel_1Process(PMI_Schedule.java:1495)
at pmi.pmi_schedule_0_1.PMI_Schedule.runJobInTOS(PMI_Schedule.java:2196)
at pmi.pmi_schedule_0_1.PMI_Schedule.main(PMI_Schedule.java:2024)
disconnected
Job PMI_Schedule terminé à 10:52 21/01/2016.
why?
As you can see I can displyed the data:
job1|Q
job2|M
Where is the problem?
Thanks
Didier
Hi, You are using "If" connection type between tflowtoiterate and tRunjob. What's the condition? It seems that ((String)globalMap.get("log.Nom_du_job")) doesn't receive any value. Best regards Sabrina
below the condition:
(String)globalMap.get("frequence").equals("Q")||((String)globalMap.get("frequence").equals("M")&&TalendDate.getFirstDayOfMonth(TalendDate.getCurrentDate())==TalendDate.getCurrentDate())
with iterate:
Démarrage du job PMI_Schedule a 11:37 21/01/2016.
connecting to socket on port 3612
connected
Exception in component tRunJob_2
java.lang.RuntimeException: The child job named null is not in the job list.
at pmi.pmi_schedule_0_1.PMI_Schedule.tFileInputExcel_1Process(PMI_Schedule.java:1617)
at pmi.pmi_schedule_0_1.PMI_Schedule.runJobInTOS(PMI_Schedule.java:2230)
at pmi.pmi_schedule_0_1.PMI_Schedule.main(PMI_Schedule.java:2058)
disconnected
Job PMI_Schedule terminé à 11:38 21/01/2016.