This topic has not yet been rated - Rate this topic

How the EDI Disassembler Works

BizTalk Server performs most processing of received EDI-encoded interchanges in the EDI Receive Pipeline (Microsoft.BizTalk.DefaultPipelines.EDIReceivePipeline). This pipeline includes the EDI disassembler pipeline component, which performs the following processing:

  • Splits multiple interchanges in a single message into separate interchanges (if the "DetectMID" pipeline property for the receive location is set to True). The EDI Disassembler does so by searching for an interchange control header (ISA, UNA, or UNB) even after an interchange control trailer (IEA or UNZ) has been encountered.

  • Validates the envelope.

  • Disassembles the interchange.

  • Validates EDI and partner-specific properties, as applicable. This includes EDI schema validation, cross-field validation for X12-encoded messages (if configured), EDI structural validation, and extended schema validation (if the schema was customized with a node that has a non-EDI data type). For more information, see Validation of Received EDI Messages.

  • Verifies that the interchange, group, and transaction set control numbers are not duplicates (if the checks are enabled in the Interchange Processing Properties page of the EDI party properties). Check the interchange control number against previously received interchanges. Checks the group control number against other group control numbers in the interchange. Checks the transaction set control number against other transaction set control numbers in that group. If a duplicate is discovered, the status report will indicate that a duplicate record exists.

  • Generates an XML document for each transaction set. On each XML file, promotes the context property of BTS.MessageType, setting it to the schema name with namespace.

  • Converts the entire interchange to XML if the Inbound batch processing option property is set to one of the two Preserve Interchange values (in the ACK Generation and Validation Settings EDI property page). The receive pipeline promotes the property ReuseEnvelope to identify the interchange as preserved.

  • Generates a Technical and/or Functional acknowledgment (if configured). This can include batching the acknowledgments (if configured). Promotes the context property of BTS.MessageType, setting it equal to the control schema in the http://schemas.microsoft.com/EDI/<X12 or EDIFACT> namespace (for example, X12_997_Root for a 997 acknowledgment). Also promotes the EDI.DestinationPartyName context property, which ensures that the acknowledgment will be picked up for sending. For more information, see Sending an EDI Acknowledgment.

  • Performs HIPAA X12 824, 834, and 837 document splitting, if applicable.

  • Promotes or writes properties to the message context (see next section).

When the EDI Disassembler processes a received message, it promotes or writes the following properties to the message context:

  • For an X12-encoded unbatched message, promotes the following properties from the envelope: ISA06, ISA08, ISA15; GS01, GS02, GS03, GS08; and ST01.

    Bb226404.note(en-us,BTS.20).gifNote
    For an incoming HIPAA 837 interchange, BizTalk Server 2006 R2 supports three HIPAA 837 schemas: Claim-Dental_837D, Claim-Institutional_837I, and Claim-Professional_837P. The ST01 for each of these is “837". These three schemas have different values for GS08: "004010X096A1" for 837I, "004010X097A1" for 837D, and "004010X098A1" for 837P.

  • For an EDIFACT-encoded unbatched message, promotes the following properties from the envelope: UNB2.1, UNB2.3, UNB3.1, UNB11; UNG1, UNG2.1, UNG3.1; UNH2.1, UNH2.2, UNH2.3.

  • If a batched interchange is split, writes ISA_Segment and GS_Segment to the context for X12-encoded messages, or writes UNA_Segment, UNB_Segment, and UNG_Segment to the context for EDIFACT-encoded messages.

    Bb226404.note(en-us,BTS.20).gifNote
    The above segments are written to the context. They are not promoted to the context. You can, however, append these segments to a transaction set using the Message Enrichment sample. You can also take the code that appends the samples and add it to a custom pipeline component. For more information, see Message Enrichment Sample (BizTalk Server Sample).

    Bb226404.note(en-us,BTS.20).gifNote
    The ISA_Segment promoted property contains security/authorization information (ISA02, Authorization Information, and ISA04, Security Information) that may lead to information disclosure. You can use the Mask security/authorization/password information property (in the ACK Generation and Validation Settings page) to replace the each character in the ISA02 and ISA04 fields with a ‘#’ character. This is a one-way process: the ‘#’ characters cannot be converted to actual characters.

  • For X12- and EDIFACT-encoded messages, promotes ReuseEnvelope, which indicates whether a batched interchange is split or preserved.

  • If a batched interchange is preserved, promotes the following properties:

    • InboundTransportatLocation

    • InboundTransportType

    • ISA05

    • ISA07

    • ISA06

    • ISA08

    • ISA15

    • LastInterchangeMessage = {True|False}

    • MessageType

    • ReceivePortID

    • ReceivePortName

    • ReuseEnvelope

The EDI receive pipeline uses the header control schema to parse the envelope of a received EDI message and the EDI document schema to parse the transaction sets/messages in the interchange.

If an EDIINT/AS2-encoded message was received via HTTP/HTTPS transport, the EDI disassembler will inspect the context property BTS.MessageDestination. If that property is set to SuspendQueue, indicating that an error occurred in AS2 processing and the message is to be suspended, the EDI disassembler will act as a passthrough pipeline component, and will suspend the message to the MessageBox.

During parsing of EDIFACT interchanges, the EDI receive pipeline removes the release indicator used to escape characters. The release indicator is not included in EDI validation. The EDI receive pipeline does not include the release indicator when it computes length restrictions.

Character Set

For X12 interchanges, the Pipeline Component Properties determine the character set that the EDI Disassembler will use when processing the interchange. It can Basic, Extended, or UTF8/Unicode. For EDIFACT interchanges, the UNB1.1 fielddetermines the character set.

Dynamic Separator Discovery

When BizTalk Server receives an EDI interchange, no party properties indicate what the separators in the interchange should be. Instead, the EDI Disassembler discovers what the delimiters are (for either X12 or EDIFACT) at runtime.

For X12 messages, the EDI Disassembler uses the following characters from within the interchange:

Separator Character

Data Element Separator

4th character of ISA

Component Element Separator

ISA16

Segment Separator

106th character of ISA

Repetition Separator or Standard Identifier

(depending on the "Use ISA11 as repetition separator" party property)

ISA11

For EDIFACT interchanges, the EDI Disassembler checks the UNA segment that defines the separators in the interchange. If the interchange does not have a UNA segment, which is optional, the Disassembler will use the default values defined in the pipeline component properties.

Separator Character of UNA

Component Element Separator

4th

Data Element Separator

5th

Decimal Notation

6th

Release Character

7th

Repetition Character

8th

Segment Separator

9th

The UNA string is optional. If it is present, it defined all the delimiters for the file. If it is not present, the EDI Disassembler will use the EfactDelimiters pipeline component property to determine the delimiters. For more information, see Configuring EDI Pipeline Properties.

Posting Errors

If the EDI disassembler encounters an EDI processing error, BizTalk Server posts the following two errors in the Event Viewer (if such posting is enabled):

  • An error logged by the source BizTalk Server 2006 while it suspends the message. This is a required error relating to BizTalk Server processing.

  • An error reporting problems in the transaction set, as logged by the source BizTalk Server 2006 EDI. This error is EDI-specific.

The EDI Disassembler will use party properties if it can identify the party (see Party Resolution, Schema Discovery, and Authorization for Received EDI Messages). If a matching sender party cannot be found in the BTAdmin database (so that party properties are not available) and the corresponding global values are not available, the EDI Disassembler properties set in the Properties window of Visual Studio will be used. However, this fallback will not occur if authentication is required in receive port properties (if either "Drop messages if authentication fails" or "Keep messages if authentication fails" are selected). In this case, a party must be configured; if not, the interchange will be suspended.

When the EDI Disassembler uses party properties, it requires that the following party properties be set:

Property EDI Property Page

Use ISA11 as repetition separator

X12 Interchange Processing Properties

EDI type (Document validation Properties)

ACK Generation and Validation Settings (X12 and EDIFACT)

Extended validation (Document validation Properties)

ACK Generation and Validation Settings (X12 and EDIFACT)

Allow trailing delimiters/separators

ACK Generation and Validation Settings (X12 and EDIFACT)

Create empty XML Tags for trailing separators

ACK Generation and Validation Settings (X12 and EDIFACT)

Inbound batch processing option

ACK Generation and Validation Settings (X12 and EDIFACT)

Default EDIFACT Separators

-

Mask security/authorization/password information

ACK Generation and Validation Settings (X12 and EDIFACT)

Convert implied decimal format Nn to base 10 numeric value

ACK Generation and Validation Settings (X12)

Route ACK to send pipeline on request-response receive port

ACK Generation and Validation Settings

X12 character set

X12 Interchange Envelope Generation

Bb226404.note(en-us,BTS.20).gifNote
This party setting is only used to validate the values entered for the party properties. The X12 character set used for runtime processing is selected in the pipeline properties. For more information, see EDI Character Sets.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ