Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
alevy
Specialist
Specialist

[resolved] Pass a value back to a calling app

In exporting a Talend job as an .exe, is there a way that an execution-return value can be passed back to whichever app calls the Talend job (other than writing to a file or DB)?
Labels (2)
1 Solution

Accepted Solutions
alevy
Specialist
Specialist
Author

I didn't end up using this but found that if using tSystem to call Talend's exported batch files (a long story as to why that was necessary), the error code from a tDie in the called job will be returned by tSystem's EXIT_VALUE.

View solution in original post

5 Replies
Anonymous
Not applicable

well, you could always use your exit code... but mixed meaning in variables is usually a bad idea. in my experience, using files for this isnt as bad as it first appears.
alevy
Specialist
Specialist
Author

This will be my first attempt at exporting an autonomous job from Talend, let alone running it from another app, so can you please explain a bit more. How do you set the exit code and how is that picked up by the calling app? At this stage I only envisage needing to know that the job completed and whether it was successful or not.
Thanks
Anonymous
Not applicable

when you export the job, youll get a zip package with a shell script and batch file inside. when you execute the batch file, the exit code will be set to 1 or 0 or whatever you jam in a tDie
if you call it with java, its returned by the Runtime.exec() function. If you just execute it from the command prompt, in windows do "echo %errorlevel%" and linux "echo $?"
Anonymous
Not applicable

In exporting a Talend job as an .exe, is there a way that an execution-return value can be passed back to whichever app calls the Talend job (other than writing to a file or DB)?

Well you could use the process exit value, but the proper way to handle depends on the calling application (shell ? code ? ... )
alevy
Specialist
Specialist
Author

I didn't end up using this but found that if using tSystem to call Talend's exported batch files (a long story as to why that was necessary), the error code from a tDie in the called job will be returned by tSystem's EXIT_VALUE.