I have an orchestration which receives an xml via direct binding.
In the orchestration I have to perform these tasks:
- Call 1 stored procedure to create a batch id (name IN, batchID OUT, errorCode OUT)
- Perform multiple inserts in a table matching the records in the xml (0..n unbounded), each record is one table row insert. I use a map to match the XML elements to the columns in the table.
- Call 1 stored procedure to end the batch (batchID IN, recordCount IN, errorCode OUT)
The DB calls must be done with the WCF-SQL adapter in Biztalk 2010.
My questions:
- How do I pass the batch ID of the 1st SP to the mapper (each record starts with a batchID column) ?
- The inserts within 1 XML must be regarded as one transaction. When one the inserts fails, the records must be rolled back. How is this achieved ?