One Star

how to run the job based on the promt values.

Hi All,
I want to run a talend job based on the promt values....
example: I am having one following requirement
i want to have one promt when ever my job starts ,my job should ask me for continue or stop.....If i click continue the job should run.Once the process done then it should ask for continue or stop again.If i click on the stop then job should stop.......so this process should be in loop...and should exit when ever i click on the stop....
Can any one help me in this..
Thanks in advance.
Ganga.
12 REPLIES
Community Manager

Re: how to run the job based on the promt values.

Hi Ganga
You can use a tMsgbox component to ask for a promt value, here is an exmaple:
code on tJava_2:
String result=(String)globalMap.get("tMsgBox_1_RESULT");
if(result.equals("0")){ //You have clicked on 'Yes' button
globalMap.put("contiues", true);
}
if(result.equals("1")){ //You have clicked on 'NO' button
globalMap.put("contiues", false);
}

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to run the job based on the promt values.

hey shong thanks a ton for your quick responce and help...i got some idea.........
I need one more help...
i have declred some context variables check as prompt...this job is callling in parent job...but while running my parent job (which is calling this child job) i am not getting any promts for context variables declared in child job.....
your suggesions would be very great help for me...
Thanks in advance,
Ganga
Community Manager

Re: how to run the job based on the promt values.

Hello
The context variable is only available in the current job, so you should aslo define the context variables in the parent job.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to run the job based on the promt values.

Hi Shong,
Thanks for your suggession.Actually my requirement is as follows...
once i start the talend job it should ask whether you want to continue or not once i click on the continue,the control should go to trunjob which will trigg the child job.Once the child job starts it should ask for the values ,once it receives the values that child job will load the those values in data base then the child job ends...after that the control sould come to parent job and should ask for continue or stop....loop continues......
Thanks in Advance,
Ganga
Jai Talend
Community Manager

Re: how to run the job based on the promt values.

Hi
I know your requirement, as I showed in previous post, using the tMsgbox component to ask for a question both in the parent job and child job.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to run the job based on the promt values.

I think what ganga wants is there must be a pop up window that will ask something like "Please enter a value here:" with a text box. Is that what you want? If yes, you could still use tMsgBox component then from the basic settings choose "Question" from the "Button" field. But, no idea on how to get the context variable ( to prompt what values to be entered) and put it inside the tMsgBox.
One Star

Re: how to run the job based on the promt values.

you are correct lovely...
"I think what ganga wants is there must be a pop up window that will ask something like "Please enter a value here:" with a text box. Is that what you want? "
i need one pop up window which ask for values in the child job.....
Could you please help me in this
Ganga,
Jai Talend.
One Star

Re: how to run the job based on the promt values.

i need one pop up window which ask for values in the child job.....

Hi, you could still use tMsgBox component then from the basic settings choose "Question" from the "Buttons" field see screeshots below:
One Star

Re: how to run the job based on the promt values.

Hey Lovely!!!!!!! Thanks a lot......Now I got the way how to start my project.....
Lovely...can we have more than on text boxes in sigle msg component...

Ganga,
Jai Talend
One Star

Re: how to run the job based on the promt values.

You are welcome :-)
Well, looking at the component, I can't see there is an option to put serveral input/enter field in one tMsgBox component.
Sir Shong, help please :-)
Community Manager

Re: how to run the job based on the promt values.

Hi
Add a tip on the question to prompt the client that you can input several values with delimiter ";" and then split the result and iterate each value.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to run the job based on the promt values.

Makes sense to me Smiley Happy Tnx Sir Shong!