Focal Point
Adapter Designer - How to Loop?

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

April 20, 2007, 09:26 AM
tbush
Adapter Designer - How to Loop?
When setting up a process flow in Adapter Designer, is there a way to call a process x amount of times? For example, I'm working on an ordering process where I'll have to call a header process once, then subsequently call a line item process once for each line item in the order.
April 22, 2007, 02:36 AM
<GDenayer>
There are a couple of techniques on how to do this. but it depends on the adapter you are using and the release level of iSM you are using.
The latest release -iSM 55 SP 1- has an itteration objects, which allows you to build loops in designer. I guess this would be the easiest way if you have this release.
If not, you should use a technique with EDA_ISLAND. This allows you to build within the transformer a document that will call an adapter as many times that the EDA_ISLAND is found.
You should find a sample document in your documentation of the adapter.
it should look something like this :

 <X>
<eda_island agent="RDBMS_NORTHWIND">
<RDBMS>
 <test1 location="RDBMS/Statements/SELECT_THIS_CUSTOMER"/>
</RDBMS>
</eda_island>
 
<eda_island agent="RDBMS_NORTHWIND">
<RDBMS>
 <test1 location="RDBMS/Statements/SELECT_THIS_CUSTOMER"/>
</RDBMS>
</eda_island>
</record>
</X>
 


Other solution is only applicable when using RDBMS adapter : within the iAE you can build a BATCH of SQL statements. this will generate the correct xsd schema. then within designer you could have 2 treads, in for insertin your header, other to insert the details. when using RDBMS, you need to siwth the listener flag 'transaction manager' this will cause an all or nothing transaction withing this process
hope this helps

This message has been edited. Last edited by: <GDenayer>,
April 23, 2007, 04:11 AM
FinSource
We've used the batch process extensively when doing transaction updates through the RDBMS adapter. We’ve found it heavy on memory use and that if the input document contains more than a 100 records it’s easier to use a bulk load tool like DataMigrator. You can use Service manage and DataMigrator in the same process.
If you are processing small documents only then the iterate function works best because each submission can be handle as a new process, giving the process more flexibility. If you’ve not upgraded yet the batch process works but you’ll need to split the document through a transformation.