Flow service sample

Hello EVerybody,

I have a scenario below:

I have a table with 4 columns: student_name,maths_marks,physics_marks,chemistry_marks

I am using the adapter select service to get the records from the table.
The result of all the marks column are objects (not strings).
Now the output which is expected is
student_name : total_marks(sum of marks columns).

Can someone help me how this can be done.(I want only flowservice without javaservice).This should be done through best practices.


Hi Gyanesh,
What Type of Database are using ORALCE/SQL Server can you be specific and
If it is ORACLE i assume under teh select adapter service under the ‘select’ tab u are mentioning the equation student_name : total_marks(sum of marks columns)., check that data type it is mentioned. This issue requires attention at the adapter service. if you are not using the equation in select tab, then u must add up the marks in the flow service
using transforms addInts. Check what is the datatype of the output and also check under the properties of the output whether u have mentioned it to be an object value

Thanks for your suggestion Rock.I followed the steps and it worked.

Btw now comes the new problem. What should i do in order to convert the output into an xml format. I could not get any inbuilt service.Any ideas

There are built in service for that.First u need to map the values to a document. Then u can get Document to XML String service to convert toXML

I am not understanding what are the values to be entered for the document’s name/value for converting from documentlist to document.

Attached is a screen shot of the database result set (documentList) which needs to be in xml form.

How do i go about?

Hi Gyanesh,
Here is the thing. Just create an document which is to exactly in form of the XML you wanted.
Results → document name & document
Total Marks (This is documentlist with following fields. Same as the Result Document List in the Adapter service )
Name Maths Chemistry Physics → are the String values.

Next you need to do is to map the db out put to this document. After this use
the DocumenttoXMLString Service and you will have the xml string. There is no need you to go to Loop

When you use the document to XML string service following will be the o/p

<Total Marks>
</Total Marks>

    <Total Marks>
</Total Marks>

    <Total Marks>
</Total Marks>