Wednesday, 27 February 2013

EDI Batching using Biztalk Server 2010

This document describes how to batch multiple EDI document into single interchange EDI.

EDI Batching in Biztalk is done using Batching orchestration(Microsoft.BizTalk.Edi.BatchingOrchestration.BatchingService) that is shipped with Biztalk. This batching orchestration is directly binded with MessageBox and picks up message with EDI.ToBeBatched=True. This flag is set when the message is received using edi receive pipeline. There is a component called "BatchMarker" in the receive pipeline that promotes and sets "EDI.ToBeBatched=True".

 Example of Interchange with multiple EDI 840 Transaction.

1: Create Receive Pipeline “EDIBatchMarkPipeline” which will mark edi document for EDI Batch.
  •  Create receive pipeline
  • Add EDI Disassembler, add Batch Marker component.

2: Create receive port “EDIBatchMarkPortFor840”and receive location with EDIBatchMarkPipeline.
Example of EDI 840 with single transaction for batching.

ISA*00*          *00*          *ZZ*US             *ZZ*THEM           *130227*0057*U*00401*000000020*0*T*:~

3: Create Batch configuration for batching.

4: Create two parties: ThemPartyFor840, UsPartyFor840

5: Create agreement for two parties name Agreement1.

6: Create identifier settings.

7: Create batch configuration for UsPartyFor840à ThemPartyFor840


Filter Expression
BTS.ReceivePortName = EDIBatchMarkPortFor840

8: Click on start batch, after click on start batch, Orchestration (Microsoft.BizTalk.Edi.BatchingOrchestration.BatchingService) Instance is created in admin console.

When you click on start button in batch configuration, an entry has been created in PAM_Control table
NOTE : BatchingService orchestration monitor PAM_Control table using sql adapter, as entry comes into table , instance of orchestration start to pick EDI  message whose EDI.tobeBatched context property is true.

9: Create Send port with Filter Expression:
EDI.ToBeBatched == False And
EDI.BatchName == Batch1

10: Start Receiveport , sendport and batch,

11: drop multiple EDI 840 to receive location, check output location.

No comments:

Post a Comment