tfilelist: Issues with using context in autonomous script

One Star

tfilelist: Issues with using context in autonomous script

hi everyone!
I'm looking for solving a problem I have with using context in tfilelist for an autonomous job.
I have done a job which is starting with
tmsgbox-->onsubjob ok-->tjava-->on subjob ok-->tfilelist_1

In msgbox I've chosen options "question" and "icone question" (french version)
in tjava I put:
context.repertoire_de_travail =(String)globalMap.get("tMsgBox_1_RESULT");
in tfilelist I put context.repertoire_de_travail in directory textline

So it should open a messagebox, ask a question and user just have to enter the file directory and everything is running well. But user put

"H:/MES_ROUTINES" in msgbox there is a null pointer exception.
The directory path is ok without using context or using a context in the contextbox... but entering the path in msgbox does not work...
i've tried with " / or\ but does not work anyway...
Any Idea how i should write it?
Thanks a lot!!
One Star

Re: tfilelist: Issues with using context in autonomous script

Hi,
I created a simple job following your details and it worked fine. Are you sure the error is happening in this part of your job?
I tried even with non-existing folder, backslash, forwardslash, any different combinations.
Would it be possible for you to take some screenshots and attach here?
Regards,
Thiago
Seven Stars

Re: tfilelist: Issues with using context in autonomous script

Maybe it's too obvious, but is your tMsgBox tMsgBox_1? Have you tried printing the result:
System.out.println((String)globalMap.get("tMsgBox_1_RESULT"));
One Star

Re: tfilelist: Issues with using context in autonomous script

Hi Guys,
I 'm very new to Talend.
I was checking on the tFileList component, where in i can mention the files in a directory.
I have mentioned the Directory path and also mentioned the format as ".csv".
But when i move to next step, that is, component properties of tInputFileDelimited, Talend should present all the global variables which we can use.
I read in some pages that i have to press Ctrl + space bar to get the list .
I m not able to get that. Is there any other way out?
Sumanth
Moderator

Re: tfilelist: Issues with using context in autonomous script

Hi Sumanth,
I 'm very new to Talend.
I was checking on the tFileList component, where in i can mention the files in a directory.
I have mentioned the Directory path and also mentioned the format as ".csv".
But when i move to next step, that is, component properties of tInputFileDelimited, Talend should present all the global variables which we can use.
I read in some pages that i have to press Ctrl + space bar to get the list .
I m not able to get that. Is there any other way out?

Check your hot key for your input. Something might occupy the "space".
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.