Export Jaspersoft ETL Jobs in JBoss ESB with Input Parameters

0

Hello Jaspersoft Comunity,

 

It's my first time working with Jaspersoft ETL and I have some question regarding the export Job.

Currently I have a Job containing subJobs. These subjobs run a DB query that the result values are used as tMap input. The job is working properly and fills another DB with the tMap output calculation. The query in the SubJob Component is something like:  

"SELECT DISTINCT \"t_pln_ls\".\"id\" FROM \"t_pln_ls\", \"t_pln_receptionprofile\", \"t_sys_user\" WHERE \"t_pln_receptionprofile\".\"sysuser\" =  \"t_sys_user\".\"id\" AND  \"t_sys_user\".\"userid\" = 'USER01' ;

 
When I export the Job as a WAR file and deploy it in Jboss reposiroty the webservice works fine when called and fills the DB as expected.
 
Now I need to change it for a different level . The DB query in subJob needs to have a dinamic  WHERE condition. When I call the webservice exported has to put the 'USER01' as input for my webservice. The new query should be something like:
 
"SELECT DISTINCT \"t_pln_ls\".\"id\" FROM \"t_pln_ls\", \"t_pln_receptionprofile\", \"t_sys_user\" WHERE \"t_pln_receptionprofile\".\"sysuser\" =  \"t_sys_user\".\"id\" AND  \"t_sys_user\".\"userid\" = '+context.user+' ;
 
For that I created a new Context variable named user and added in the subJob that run the query. After that I'm having 2 problems.
 
1. The query doesn't work (It's seems that the context variable is not set ). How can I configurate it?
2. When I export the Job, how can I put this context as an input parameter of the webservice?
 
 
Thx all for reading my issue and I hope it's easy to do.
 
Cheers
igor.murta's picture
Joined: Sep 19 2014 - 6:39am
Last seen: 5 years 2 weeks ago

0 Answers:

No answers yet
Feedback
randomness