Search This Blog

Thursday 9 December 2010

BizTalk AS2 EDI

This article will briefly discuss about the AS2 & EDI support in BizTalk 2010.
Unlike the earlier versions, BizTalk 2010 has extensive native support for EDI message processing & also AS2 protocol support.
BizTalk 2010 introduces new concepts for Trading Partner Management (TPM) such as Partner profiles & Agreements. We would now be able to define the trading partners involved in the B2B process as Parties in BizTalk with separate business profile created for each party.Seperate Agreements could be created for different protocols such as EDI(X12/EDIFACT)/AS2  between two different parties .
The reason behind Business profile is, to have different profiles created for different units/teams within the same Party, so that different units/teams within the same parties can have different agreements defined on different protocols.
For example Company A has 2 business profiles created for Sales & Marketing units.
Let’s say, Company A – Sales unit connects with Company B - Sales unit using AS2 /X12 and Company A – Marketing unit connects with Company B - Marketing unit using AS2/ EDIFACT, then there will be separate Agreements created for each business profile.
Now , we know the terminologies of TPM such as Parties, Business Profiles, Agreement, Message Protocols (EDIFACT, X12) & communication protocol AS2.Its time to see the steps involved in creating & configuring a basic TPM solution between 2 parties (Let’s say Company A & Company B).
1.     Decide the message protocol .I am going with X12 for this article. But, there are only few differences between X12 & EDIFACT.
2.     Decide & list the type of transactions & documents between the parties. BizTalk provides schemas for almost all of the transaction types. I will go ahead with X12 04010 856, which is the shipment notice schema.
3.     Decide the format of transactions (XML, EDI).This will make a difference in choosing the right Pipeline in the send/receive ports. The default pipelines available for AS2 processing are AS2Send/AS2EdiSend & AS2Receive/AS2EdiReceive respectively for XML and EDI.If you want to generate the message in edi format then we should use AS2EdiSend, otherwise it will be AS2Send.
4.     Define the mapping rules for the EDI transactions. This step is very important and complicated during the entire process, as we should have the mapping implemented properly in BizTalk to generate the EDI message, as desired.
5.     Create & configure TPM (Parties, Business Profiles & Agreements).Parties and business profiles will be created for CompanyA & CompanyB .Separate agreements will be created for AS2 & X12 .The AS2 agreement will have configuration settings to specify whether the messages needs to be signed/encrypted/compressed, whether to request for MDN and also to associate the send port, which will be used to send the message to CompanyB. Based on the settings for signing & encryption, certificates should be configured at send port level.

6.     Once all above are done, we can create & deploy the BizTalk artefacts needed for the entire process.
This might include
-         Creating internal shipment schema for CompanyA
-         Adding the existing X12 04010 856 schema provided by BizTalk.
-         Create mapping between the two schemas.
-         Create orchestration, if it is necessary. Otherwise, the mapping can be configured in the send port.
-         Create & configure the necessary physical receive & send ports.
-         Build & deploy the project.
So, briefly, CompanyA creates internal shipment notice which matches its internal schema & the same is mapped against X12 04010 856 schema. The generated EDI message is validated, assembled & encoded by the AS2EdiSend pipeline and delivered to the CompanyB‘s HTTP/HTTPS url configured in the send port. The AS2 specific message context is included from the Agreement defined between the 2 parties. The Agreement also helps in specifying the Transaction set validation rules, character set and separators and so on.
If we need to receive an MDN back from the CompanyB, for the X12 04010 856 message sent, we can configure the same in the Agreement and with the help of 2-way send port, the MDN can be received in BizTalk.
Hope this article helps to understand the basis of AS2/EDI processing with BizTalk 2010 & the high level steps involved in implementing a solution. Thanks for reading & Good Luck!!!



No comments:

Post a Comment