Focal Point
[SOLVED] How to run Stored Procedure in pFlow

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/2657097276

September 23, 2014, 04:30 PM
Chad.Anderson
[SOLVED] How to run Stored Procedure in pFlow
I am fairly new to iWay integration tools and I have been having difficulties with a few things. I am currently trying to understand how to run Stored Procedures inside a pFlow. Which execution object should be used for this? And how would I use a Transform to input data into the Stored Procedure? Any help would be awesome. Thanks in advanced!

This message has been edited. Last edited by: Tamra,


iWay 7.0.0, Linux
September 24, 2014, 05:17 AM
Srii
1) Create an adapter Target for connection to the database and import it into your iIT Project;
2) Locate the SP in question and generate request & response schemas out of it and import them as well into your iIT Project;
3) Create a pFlow in your iIT Project and use the imported resources. Build your input payload based on the request schema and put it right in front of Adapetr object inside your pFlow;
4) Test the efforts;
September 24, 2014, 11:59 AM
Chad.Anderson
Thank you so much for the response. I was pretty sure I needed to use the adapter I just wasn't sure how it was supposed to be used.


iWay 7.0.0, Linux
September 24, 2014, 12:03 PM
Chad.Anderson
So I just tried this solution and I am getting this error back.

cause: com.ibi.rdbms.exceptions.RDBMSException: Invalid lookup:
Adapter is running in a transaction; propagating the exception higher up
Detected problem in execute of agent 'EBS_PLMB' on execute: getMessage(): Invalid lookup:
int getError(): Server
getAdapterCode(): null
getVendorThrowable(): com.ibi.rdbms.exceptions.RDBMSException: Invalid lookup:

What causes this error to happen?


iWay 7.0.0, Linux
September 25, 2014, 09:23 AM
Srii
If the input XML, that is passed to adapter obejct in your pFlow, doesnt contain the location attribute, it will fail with this error. The location attribute will be present in the schema generated out of the target. If you use external tools like Altova XML Spy to generate a sampel XML file from the schema, make sure to check "Generate non-mandatory Attributes" or something along those words and use that XML or simply add attribute to the XML root and retest.

-
Srii

This message has been edited. Last edited by: Srii,
September 25, 2014, 11:38 AM
Chad.Anderson
So the Schemas that I am using were generated from a target inside iWay explorer. However I still get this error. Do I need to make special changes to the Schema once I have generated it? I am currently using Transforms to create the XML's from the Schema's that I have created.


iWay 7.0.0, Linux
September 26, 2014, 03:51 AM
Srii
Open the schema, look for an attribute called 'location' and pick up its default value. Come back to your sample xml input file, verify that the root tag is indeed Adapter and add the attribute tag 'location' with its value set to what was taken out of the 'default' value from the schema. Run your test again.

-
Srii
September 26, 2014, 10:44 AM
Chad.Anderson
That worked! Thank you so much for you help.


iWay 7.0.0, Linux