|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (23)
View Page Historyh2. Exporting the job
The job export is detailled in the use case "A Simple Talend Job".
There is no difference.
There is no difference.
Select the job and right-click it. Select *Export to Petals ESB*.
Update the target destination.
Let the job be exposed as a singleton.
Update the target destination.
Let the job be exposed as a singleton.
Click *Edit the exposed contexts*.
A dialog shows up. Export the _outputLocation_ context as a parameter.
A dialog shows up. Export the _outputLocation_ context as a parameter.
You should have the following dialog:
!SimpleJobExportContext1.jpg!
Click the *Export mode* column, and select *Parameter* in the combo box. Click *OK*.
The link label should be updated and indicate the number of exported contexts.
!SimpleJobExportContext2.jpg!
Click *Finish*.
Click the *Export mode* column, and select *Parameter* in the combo box. Click *OK*.
The link label should be updated and indicate the number of exported contexts.
!SimpleJobExportContext2.jpg!
Click *Finish*.
h1. Deploying and testing in Petals
</xs:sequence>
</xs:complexType>
</xs:complexType>
<xs:complexType name="talendContexts">
<xs:sequence>
<xs:sequence>
<xs:element name="outputLocation" type="xs:string" minOccurs="0"
default="C:/Documents and Settings/vzurczak/Bureau/output.csv" />
</xs:sequence>
</xs:complexType>
</xs:sequence>
</xs:complexType>
<xs:complexType name="inAttachments">
<xs:sequence>
</xs:sequence>
</xs:complexType>
<xs:sequence>
</xs:sequence>
</xs:complexType>
<xs:complexType name="inRow">
<xs:sequence>
<xs:sequence>
{note}
Obviously, the file path example to illustrate a context may not be the best one (for portability reasons).
Anyway, it serves its purpose, which is being an example.
Anyway, it serves its purpose, which is being an example of interactions between Petals ESB and a Talend job.
{note}
\\
Now, your input message should be:
Now, your input message (in SoapUI) should look like this:
{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>
<soapenv:Header/>
<soapenv:Body>
<tal:executeJob>
<!--Optional:-->
<tal:contexts>
<!--Optional:-->
<tal:outputLocation>C:/Documents and Settings/vzurczak/Bureau/output.csv</tal:outputLocation>
</tal:contexts>
<!--Optional:-->
<tal:in-attachments/>
<!--Zero or more repetitions:-->
<tal:in-data-bean/>
<!--Zero or more repetitions:-->
<tal:talend-option>?</tal:talend-option>
</tal:executeJob>
</soapenv:Body>
</soapenv:Envelope>
</tal:contexts>
<!--Optional:-->
<tal:in-attachments/>
<!--Zero or more repetitions:-->
<tal:in-data-bean/>
<!--Zero or more repetitions:-->
<tal:talend-option>?</tal:talend-option>
</tal:executeJob>
</soapenv:Body>
</soapenv:Envelope>
{code}
\\
\\
And the returned message should be:
By default, SoapUI (as well as any generated Java client) puts the default value as the initial value.
However, the interest is that it can be changed.
However, the interest is that it can be changed.
{code:lang=xml} {tip}
Exposing a context as a parameter allows anyone to specify a context value.
While using the native Talend parameters requires the user to know both how jobs work and how this job was designed.
{tip}
While using the native Talend parameters requires the user to know both how jobs work and how this job was designed.
{tip}
\\
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>
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}
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}