Hi,

I´m trying to create a External DB Gateway to populate the parameter Customers:
<xs:complexType name="Customers">
<xs:sequence>
<xs:element name="Customer" type="info" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="info">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Title" type="xs:string" />
<xs:element name="Age" type="xs:integer" />
</xs:sequence>
</xs:complexType>

I am using a MSSQL database and the connection is working and I am using the folowing query:
_dbEngine.execSQLQuery("SELECT CAST(ContactTitle as varchar) AS Title, CAST(ContactName as varchar) AS Name, Age FROM Customers.

How can I get the value of Title, Name and Age since the query returns a List of Objects, and how can I return the Element with the values.

Hi,

your question sounds like it is related to Java type conversion. Did you have a look at our tutorial on database gateways?

It was written for YAWL V 2.x. If it helps you or if you have any further questions, we would be happy to hear about it.

-ah

 

riyaz.lakhani

Fri, 07/10/2015 - 13:25

Hi Ahense,

I am getting below error (screenshot attached) while using same .yawl or .java file to retrieve data using Data Gateways.
1.Error_in_browser.JPG
When I am loading (same) dataGateway.yawl
2.Yawl_Specification.jpg
Java class name is available under Data Gateway properties
3.Error_in_Mapping.JPG
Error while binding

-Suggest us location to put .class file if it is not proper.

Referring same tutorial suggested by you : http://www.yaug.org/content/working-database-gateways
YAWL Version:3.0.1

Thanks in advance for your help
Riyaz