One Star

tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Hi All
TOS 5.2.1
I checking idea of using control table (in Oracle) for running Talends jobs dynamically.
Have something like in tOracleInput:
Select job_name from A_JOB_CONTROL a
where a.flag_active ='Y'
order by job_type , job_sub_type , order_run
-> -> java
--iterate >
and then tries to call tRunJob
with
Use dynamic job option
Context job : context.CONTEXT_JOB
but get Errors:
Parameter (Job) is empty but requied
Parameter (Context) is empty but requied
But because Use dynamic job option checked , textbox for job is disabled.
When I press continue I got :
Exception in component tRunJob_3
java.lang.RuntimeException: The child job named csv_000 is not in the job list.
but csv_000 job exsits for sure (in root folder)!!
What is wrong ?
8 REPLIES
Seven Stars

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Screenshots of your settings are always helpful...
One Star

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

I tried add to name of job in variable quotes :"csv_000"
it doesnot help
Seven Stars

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Just click on the ... button and select all the jobs that you want the tRunJob to be able to run.
Moderator

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Hi,
Please see the online component reference tRunJob.
Once there is empty in drop down list, save your jobs(parent and child) and close it. Re-open it to see if this issue repro again.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Just click on the ... button and select all the jobs that you want the tRunJob to be able to run.

Great !!! - need list of ALL jobs : j_test_catcher;a_fail;csv_000
THANKS
from error message : job named csv_000 is not in the job list
I could assume that ALL jobs which will be runn dynamically should be in list.
One more question left :
Still left :
Parameter (Context) is empty but requied
When I press continue it works ok
I put for test there also any string value : "0" - it works , 12 - works , #@@#%- works
from Doc :
Context :
If you defined contexts and variables for the Job to be run by the tRunJob, select the applicable context entry on the list.

My goal is to run all jobs in context specifiled in Head job.
(to be able quickly swith between test/dev/prod in one place)
For this in trunJob I put
Transmit whole context on checkbox ON :

Could you pls say few words what should be in Context textbox ?
Now for me it is Not clear from Documnetation
Seven Stars

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

I think with "Transmit whole context" checked you'll get the result you want and you can just leave the Context textbox as Default.
One Star

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Hi all,
please help me in below scenario,
i want to run sub jobs one by one but without checking the job option in tRunjob and before entering into tRunjob i want to mention like which sub job has to run first, whether all has to be run or only selected sub jobs and for this i have created one table which gives status column it has to pick which is pending.
Moderator

Re: tRunJob :Use dynamic job option Not Work for jobs with Dynamic names

Hi,
i want to run sub jobs one by one but without checking the job option in tRunjob and before entering into tRunjob i want to mention like which sub job has to run first, whether all has to be run or only selected sub jobs and for this i have created one table which gives status column it has to pick which is pending.

It seems you want execution order of subjobs. Have you tried to use the onsubjobOk link?
subjob1-->OnSubjobOk-->tRunJob-->OnSubjobOk-->subjobXXX
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.