August 15, 2023

Scenario 3: Calling a Job with context variables from a browser – Docs for ESB 6.x

Scenario 3: Calling a Job with context variables from a browser

This scenario describes how to call the Job you created in Scenario 2: Buffering output data on the webapp server from your browser with/without modifying the
values of the context variables.

Type the following URL into your browser: http://localhost:8080//export_job/services/export_job3?method=runJob
where “export_job” is the name of the webapp directory deployed in Tomcat
and “export_job3” is the name of the Job.

Use_Case_tBufferOutput14.png

Click Enter to execute your Job from your
browser.

Use_Case_tBufferOutput15.png

The Job uses the default values of the context variables:
nb_lines and lastname,
that is it generates three lines with the current date, first name and Ford
as a last name.

You can modify the values of the context variables directly from your browser.
To call the Job from your browser and modify the values of the two context
variables, type the following URL:

http://localhost:8080//export_job/services/export_job3?method=runJob&arg1=–context_param%20lastname=MASSY&arg2=–context_param%20nb_lines=2.

%20 stands for a blank space in the URL language. In the first argument
“arg1”, you set the value of the context variable to display “MASSY” as last
name. In the second argument “arg2”, you set the value of the context
variable to “2” to generate only two lines.

Click Enter to execute your Job from your
browser.

Use_Case_tBufferOutput16.png

The Job generates two lines with MASSY as last name.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x