Mohsin Kalam’s Blog

October 5, 2007

R2 Engine Send

Filed under: R2 EDI — Mohsin Kalam @ 11:59 am


To provide in depth analysis of how R2 Engine Send serializes an EDI document. 


Engine Send is implemented as a BizTalk pipeline with EDI Assembler component in the Assemble stage.

Engine Send:

Below is a diagram of the EDI Send Pipeline showing the individual component

EDI Send

EDI Send pipeline does the following when serializing a document

  • Party Resolution
  • Schema Discovery
  • Document Processing
  • Envelope Application
  • Apply Party Specific Properties (or Global)
  • EDI Validation
  • Character Set Validation
  • Status Reporting

Party Resolution:

Like Engine Receive, Engine Send requires party or global settings to apply during serialization. Party resolution is explained in detail here.

Schema Discovery:

Once the source of the settings is determined, Engine Send tries to discover the Schema. Schema discovery process is defined here.

Document Processing:

Like Receive, Engine Send also supports 3 different mode of processing but unlike receive where you have to configure the mode of processing, the processing mode in Engine Send is dynamic. They are as follows:

1. Serializing an Individual Transaction Set:

In this scenario, XML documents without the envelope segments are fed to the send pipeline and an EDI document is produced. The envelope information comes from Party as Interchange Receiver settings of either the party the document resolves to or global settings.

2. Serializing a BIBO Message:

In this scenario, the whole interchange with all the envelopes in XML format is fed to the send pipeline and the it is serialized. Since the envelope information and the delimiters are already present in the XML file so no additional settings are required.

3. Serializing a Batch Message:

This is essentially the same as BIBO but Send Pipeline updates selected fields in the envelopes. Send pipeline differentiates between the mode 2 and 3 by the presence of the promoted property “PopulateInterchangeValues” in a batch message. If this property is promoted and set to true, Send Pipeline updates selected fields (explained in the next section).

The difference between Batch and BIBO message is that a Batch message is Party dependent. Meaning if a party cannot be resolved to fetch the settings, the message will be suspended.

Envelope Application:

Envelope application is at the heart of Send Pipeline and the functionality varies for the 3 modes of processing. It is explained in great detail here.

Apply Party Specific Properties (or Global):

During serialization, R2 provides the ability to apply certain settings on the document being processed. These include generating trailing separators and turning validation on or off. If a party cannot be resolved, these settings are applied from a combination of global and pipeline component level settings. If a document resolves to a party, the settings are taken from that party. In other words, the global and pipeline settings are enough to perform processing. Party specific properties are just an addition to the process that allows fine grain customization. 

A separate post will follow that will explain all the properties in PAM, Global and Pipeline component settings.

EDI Validation:

EDI validation includes Min/Max length validation, Min/Max Occurs validation and validation of specific data types against the standard (e.g validating X12_Nn datatype only contains numeric type etc). A document failing any of these validation will be suspended.

In case of a party not being resolved, validation is always performed. At the party level, the default setting is to enable validation. The validation can be made lax by unchecking this option in PAM under Party as Interchange Receiver/ACK Processing and Validation Settings.

Please note that in case of BIBO or Batch processing mode, the envelope validation will always happen against the control schemas regardless of this option configured in PAM.

Character Set Validation:

EDI documents allow certain encoding types as defined by the specific standard. Each encoding type allow only certain characters as the valid characters. The engine performs this character set validation to ensure the characters fall within the allows range as the standard defines them. The detailed information can be found here.

Status Reporting:

EDI engine provided detailed status reporting for the documents flowing within the EDI system. The reporting is available at both the Party and Global level. Status reporting is turned off by default. When turned on, the status reporting provides details about Interchange and correlated ACK status, Batch status, Interchange Aggregation status for each party and Transaction Set Aggregation status for each Transaction set. The report is available within the group hub page under EDI Status Reports.

End Note:

I hope this post has been useful in understanding the EDI Engine Send. Your comments/questions are always welcome.


Mohsin Kalam


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: