A Simple Talend Job - Overriding a Context

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (12)

View Page History
{section}
{column}

h1. Preliminary notes


\\
Now, your input message should be:
Now, your input message (in SoapUI) should look like:

{code:lang=xml}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tal="http://petals.ow2.org/talend/">
<soapenv:Header/>
<soapenv:Body>
<tal:executeJob>
<!--Optional:-->
<tal:contexts/>
<!--Optional:-->
<tal:in-attachments/>
<!--Zero or more repetitions:-->
<tal:in-data-bean/>
<!--Zero or more repetitions:-->
<tal:talend-option>--context_param</tal:talend-option>
<tal:talend-option>outputLocation=C:/Documents and Settings/vzurczak/Bureau/newOutput.csv</tal:talend-option>
</tal:executeJob>
</soapenv:Body>
</soapenv:Envelope>
{code}

\\
And the returned message should be:
Instead of writing the output in the _output.csv_ file, we write it into _newOutput.csv_.

{code:lang=xml} \\
The returned message, when everything works, is:

{code:lang=xml}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<tns:executeJobResponse xmlns:tns="http://petals.ow2.org/talend/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:talend-job-output>
<tns:executionResult>
<jaxb:item xmlns:jaxb="http://jaxb.dev.java.net/array">0</jaxb:item>
</tns:executionResult>
<tns:outAttachment/>
</tns:talend-job-output>
</tns:executeJobResponse>
</soapenv:Body>
</soapenv:Envelope>
{code}

\\
If the job execution fails, the 0 is replaced by another integer, e.g. 1.
One failure reason can be, as an example, that the database is not started.

\\
Another way to check the job's successful completion, is to check the existence of the output file.
Here are the first lines if this file (the database was populated with random values from another Talend job - do not be shocked by the values).

{panel}

Griffith Paving and Sealcoatin;talend@apres91
Bill's Dive Shop;511 Maple Ave. Apt. 1B
Childress Child Day Care;662 Lyons Circle
Facelift Kitchen and Bath;220 Vine Ave.
Terrinni & Son Auto and Truck;770 Exmoor Rd.
Kermit the Pet Shop;1860 Parkside Ln.
Tub's Furniture Store;807 Old Trail Rd.
Toggle & Myerson Ltd;618 Sheriden rd.
Childress Child Day Care;788 Tennyson Ave.
Elle Hypnosis and Therapy Cent;2032 Northbrook Ct.
Lennox Air Pollution Control;4522 N. Greenview Apt. 1B
...

{panel}