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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Integrate TalenJob in route

hi
I have a job :
- tFileInputDelimited -> tMap -> TAdvancedFileOutputXml just for a transformation
I export this jar file and reimport it as a TalendJob in a route
In this route I would like to files arriving in a cFile and tFileInputDelimited that I have in my job.
So from a cFile, launch a route.
how could I do it?
thks
Valery

Labels (3)
14 Replies
Anonymous
Not applicable
Author

Can Someone help me?
thks
valery
Anonymous
Not applicable
Author

Hi,
I don't want to dissapoint you, but seems even the TOS supports to add the tJob icon to the route model, it doesn't work - neigther for me. In some docummentation or one of forum contributions I found that this feature still needs to be developed (I use TOS 5.0.2).
As a solution - we exposed our jobs as services or mroe often - let them listen on their queues, and then from mediation route (Camel) or eny external application we send a message to the job queue for processing or call the job's web service.
so - in the route send the file content or the file name - cFile-->cMessageEndpoint and than have a job tMomInput->process the message
Couldn't find anything better 0683p000009MPcz.png
Gabriel
Anonymous
Not applicable
Author

hi valery,
here's what you need to pass the filename from the Camel route to the job:
1) in the job you need a context variable, e.g. filename - I assume you have that already
2) create a Camel route like the one attached

3) cTalendJob passes all Camel headers to the job, so you need to set a header that has the same name as the context variable in your job, e.g. filename - see the next screenshot for how to configure a cSetHeader

4) if the job you want to start from the route requires additional JARs that are not yet on the classpath, you need an additional cConfig to add the external dependencies. I needed talend_file_enhanced_20070724.jar for a tFileInputPositional.


let me know if this is what you needed and works for you?
hth
bernhard
Anonymous
Not applicable
Author

Hi,
that is a great help even for me, thanks 0683p000009MACn.png
Gabriel
Anonymous
Not applicable
Author

Hi guy's
it's so simple when you speak with person who knows the product.
@bschuhmann,
As I can see you work for Talend. So I have some question for you.
- Why those type of basic actions are not documented somewhere? effectively integrate a route with a job is the added value of the product. Why is it so difficult to find doc about it?
The product is it mature enough?
- by reading doc, I found that we have to use config object to define librairies. Why do we have to do it? effectively when I am importing the Jar job file, all those required librairies are already it the Web-inf/lib directory?
Thks for your help. Now it's more clear
Valery
Anonymous
Not applicable
Author

Hello all.
Many many thanks for the short description of how to pass arguments from a route to a job.
This was the piece of glue I was looking for the last few month.
Regards,
Alexander.
Anonymous
Not applicable
Author

Hi Valery,
- Why those type of basic actions are not documented somewhere? effectively integrate a route with a job is the added value of the product. Why is it so difficult to find doc about it?

We're writing doc, just need to ask for a bit more patience 0683p000009MA9p.png
The product is it mature enough?

It is. Test it and I'm confident it will work for you.
- by reading doc, I found that we have to use config object to define librairies. Why do we have to do it? effectively when I am importing the Jar job file, all those required librairies are already it the Web-inf/lib directory?

Give 5.1 RC1 a try, I know we're working on it and it might already be fixed. Dependency resolution is not trivial (especially with the different runtime environments) and we though even with this snag, cTalendJob is already useful.
Anonymous
Not applicable
Author

Hi,
another related question - maybe it is simple and I am not aware of it..
is there a simple way to get data back from the integrated "in-route" job?
In theory - I can create a web service from a job and invoke the job as a service. But if there's a simple way to synchronously call the job, maybe there's a way to get data back (something like using tBufferOutput) like between Talend jobs..
Thankx in advance
Gabriel
Anonymous
Not applicable
Author

One way is to use a tSocket connector on the job side and a camel-mina component on the other side. Alternatively you could use JMS with tMOM on the job side and the cJMS on the route side. I'll post a link to an example later.