EDI messages consist of an envelope and a hierarchical series of structural elements. The envelope contains a set of headers and trailers, each set of which describes and contains a structural element.
The hierarchical structure of an EDI message enables transaction sets/messages and groups to be batched. Even if an interchange contains only one transaction set/message and only one group, that interchange is structured with the same basic structural elements that it would have if it were batched, with the exception that there would not be multiple transaction set/message or group elements.
Send EDI Messages Scenario
Your orchestration wants to send EDI messages that are by creating EDI files that must be batched by the application.
Important note: using EDI as part of your solution namespace will not let you use this properties. (see Avoid using EDI in your namespaces)
This link explains how BizTalk decides to send EDI messages batched and which batch to use. Assembling a Batched EDI Interchange. In the scenario where you are creating a batch from an orchestration, you can promote this three properties:
EDI.ToBeBatched = true;
EDI.BatchName = “Some predefined name’ that you should use in all your agreements. It can be the default name “Batch1”.
EDI.DestinationPartyName = you must get this information from somewhere. This like comes from your incoming message.
Adding References
To do this you must add references in your project to Microsoft.BizTalk.Edi.PipelineComponents and Microsoft.BizTalk.Edi.BaseArtifacts.
You can set this properties in an expression shape like this:
msgX12_835(EDI.ToBeBatched) = true;
msgX12_835(EDI.EncodingType) = 1; //0 for EDIFACT, 1 for X12
msgX12_835(EDI.DestinationPartyName) = msgBRecord.ISA08_ClearinghouseReceiverID;
msgX12_835(EDI.BatchName) = “Batch1”;
If you or your organization needs help creating these kind of projects you can contact our expert team in Art2link. Art2link has developed significant experience over the years, during the implementation of hundreds of EDI transaction sets. Our expertise with EDI transactions, and the systems that support those transactions will enable your enterprise to respond to these challenges more quickly, and with less expense than you expect.
For more EDI info click here