Web Form To Start Talend Job

One Star

Web Form To Start Talend Job

I'd like to use a Web Form to get a couple fields / parameters from a user and then, when they click submit, it would trigger a Talend Flow that would use the data input on the form to query my DB and deliver a data file to the user via e-mail.
Any ideas on how to go about this would be greatly appreciated. I've read several posts here relating to similar things, but I'd like some pointers from others who have already done this....

THANKS!
One Star

Re: Web Form To Start Talend Job

Hi,
I would doing so :
1) Export Job as WebServices
2) Deploy it on a Tomcat Server
3) Call the WebServices from the form (in my case a .NET application)
For exemple :
MyPackage.myExportedJobService service = new myExportedJobService ();
string[] args = new String;
args = "--context_param";
args = "param1=" + this.value1;
args = "--context_param";
args = "param2=" + Server.HtmlEncode(this.txtField.Text);
string[][] sret = service.runJob(args);

Hope that help.
One Star

Re: Web Form To Start Talend Job

I'm agree with your solution. But for me,one of my jobs is running during 2 hours. So I have a problem of Timeout exception. Do you see a solution ?
Thx
One Star

Re: Web Form To Start Talend Job

A different solution could be to use a scheduler for this. One example is Job Scheduler. You can define a parameterized job and use can start them via a web frontend. May be TIS (provided by Talend) has the same feature.
But in this example you do not have a web service and cant use your own web frontend or program to call the job.
Bye
Volker
One Star

Re: Web Form To Start Talend Job

I see other solutions for the long running process (without using TIS):
1) Using BPEL process to wrap (invoke) the Talend job webservice
- Create your job as normal, and export it as a webservice;
- Create a BPEL process using Netbeans (or another IDE, with BPEL support), this process will invoke your job synchonouslly, but you will expose the BPEL process as a asynchronous webservice. The BPEL process will remain running until the Talend job finishes (it called "long running process"). That way you could also check, using another soap message, if the job is still running (each process will need an id).
2) Changing the Talend job webservice call from syncrhonous to asynchronous.