Tuesday, January 10, 2012

BizTalk 2010 Batch Configuration process in Agreement

Using Batching in agreement in BizTalk 2010. The batch logic seem clear enough.

1. The receive location and Receive port cannot have a orchestration in the middle. I could not get it to work.
2. I droped the debatched files to a folder.
3. The receive location read the folder with using the EdIReceive pipeline.
4. Nothing special about the Receive Port.
5. The Batch Configuration" tab was configured in the agreement, on the batch configuration tab. Give it a batch name, you can filter your send port with the batch name. select Start immediatly. To a proof of concept I selected maximium number of transactions. Interchange and 2.
6. On the filter I used:
BTS.ReceivePortName == BatchTest
This is the name of the receive port.
7. Pressing the "Start" button(about 5 lines down on the Batch configuration tab) lanches a orchestration that does the work. You can see the orchestration on the group hub.
8. Create a send port.
9. Do not put the send port in the send port tab of the agreement.
10 The send port will have a filter.

You could put many things in the filter but you need:

EDI.ToBeBatched == False

other filter items to restrict criteria as needed.

Three tricks here:
1. Use a receive and send port with nothing in the middle.
2. Do not put your send port name in the send port tabs of your agreement.
3. Use the EDI.ToBeBatched == False as one of the send port filters to transport your batched file.

Problems:

1. If the orchestration is not running and you drop files, it errors nicely in the group hub.
2. The batch process may pick up multiple EDI types like your 997 or 999 if you are not careful.

Good luck.