Archive for the EDI Category

Valuable BizTalk Mapping Book

Posted in BizTalk General, EDI on April 16, 2009 by mdbeckner

There is an extremely good book on BizTalk mapping that has been recently released. Great value to any developer. Includes excellent EDI samples.

Pro Mapping in BizTalk Server 2009

http://www.amazon.com/Mapping-BizTalk-Server-Experts-Voice/dp/1430218576/ref=sr_1_4?ie=UTF8&s=books&qid=1239909911&sr=8-4

Recurring EDI Error

Posted in EDI on March 26, 2009 by mdbeckner

The following error is extremely common in EDI deployments:

6: Missing or invalid or duplicate Transaction set identifier ‘http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_850′

It generally means one of two things:

1. The EDI schema is not deployed properly (or is partially deployed).

2. The schema has been deployed more than once and two (or more) versions of it appear in the GAC.

Using Inline XSLT to Create Target Nodes

Posted in EDI on October 31, 2008 by mdbeckner

Creating nodes using Inline XSLT often eliminates much of the complexity around mapping.  To demonstrate how to use XSLT, this post will illustrate an XSLT script that created three N1 target records using two “dynamic” input records and one “static” record.

The input has two out of the three records, the third record is hard coded into the XSLT.

The Map looks as follows:

The Map

The Map

As can be seen, the source XML has a node called “TradingPartners” that contains the two dynamic records.  The XSLT script will loop through all of the incoming TradingPartner nodes and create N1 elements based on those.  Once all of the TradingPartner nodes have been looped through, the XSLT will create one final element based on static values.  The XSLT script is shown here:
<xsl:for-each select=”//*[local-name()='TradingPartner']“>
<xsl:element name=”ns0:N1″>
<xsl:element name=”N101″><xsl:value-of select=”*[local-name()='IDCode']“/></xsl:element>
<xsl:element name=”N102″><xsl:value-of select=”*[local-name()='TPKnownAs']“/></xsl:element>
<xsl:element name=”N103″>9</xsl:element>
<xsl:element name=”N104″><xsl:value-of select=”*[local-name()='TPDUNS']“/></xsl:element>
</xsl:element>
</xsl:for-each>
<xsl:element name=”ns0:N1″>
<xsl:element name=”N101″>SF</xsl:element>
<xsl:element name=”N102″>STATIC TRADING PARTNER NAME, INC.</xsl:element>
<xsl:element name=”N103″>9</xsl:element>
<xsl:element name=”N104″>012345697654</xsl:element>
</xsl:element>

* Note that the value-of XSL is looking for “local-name()”.  This enables source documents with namespace prefixes (such as ns0) in them to be mapped.  In this case, the source is <ns0:TradingPartner>. 

Mapping Hierarchical (Structured) XML to Flat XML

Posted in EDI on October 31, 2008 by mdbeckner
To illustrate how to map a hierarchical EDI structure to a target flat structure, I’ll work with the DTM field in an 867.  Assume the following rules:
1. If the DTM01 node = 003, map DTM02 to one node in target schema.
2. If the DTM01 node = 004, map DTM02 to a different node in target schema.
By default, I know that I need to place two “Equals” functoids and two “Value Mapping” functoids to get the values across, as shown here:
Incorrect Mapping (checks only the first occurance of DTM)

Incorrect Mapping (checks only the first occurance of DTM)

With the incorrect output (shown here) showing only one of the targeted nodes.  This is because the map is not looping through all of the source DTM nodes.
Output of Incorrect Mapping

Output of Incorrect Mapping

Knowing that there always two or more DTM nodes in the source, the map will need to be forced to loop through all occurances.  This can be done by adding a “Loop” functoid, with the input being the root DTM node, and the output being both of the desired output nodes.  This map looks as follows:
Correct Mapping (with Loop Functoid)

Correct Mapping (with Loop Functoid)

This will cause the map to loop through all occurances of the source.  Only those occurances which match the “Equals” logic will be mapped across.  The correct output is shown here:
Result

Result

Tech-Talk from TechEd 2008

Posted in EDI on August 25, 2008 by mdbeckner

The following talk was with done with Greg Hughes at TechEd in Orlando.

Achieving Success with BizTalk Server 2006 R2 and EDI Implementations

Error on BizTalk EDI Configuration

Posted in EDI on February 21, 2008 by mdbeckner

Occassionally, such as after uninstalling BizTalk Server 2006 R2, installing BAM and EDI/AS2 components through the BizTalk Configuration application will result in the following error:

“Please make sure that all BAM related Data Transformation Services (DTS) packages are removed along with the BAM databases”

The solution to this issue is outlined in the following article: http://support.microsoft.com/kb/939549

Notes on the EDI/AS2 installation are shown here: http://technet.microsoft.com/en-us/library/bb743506.aspx

Several Question/Answers on BizTalk EDI

Posted in EDI on February 16, 2008 by mdbeckner

I have received a number of recurring questions regarding specific concepts in EDI implementations using BizTalk R2. Here are a couple of questions/answers:

Q: “Could you please give me more information on Parties and Global EDI Properties?”

A: The simplest thing to say about Global Parties is to IGNORE THEM ALTOGETHER. The EDI team at Microsoft had a vision for Global Parties, but in reality there is very little applicability to real world implementations. Basically, it can be set as a “default trading partner” when documents to not validate against any other parties; however, there really is no use for a standard implementation. The book covers it to show how Microsoft intended the use, and how it can be used, but I would recommend skipping this for your own dev purposes.

Q: “While working on Trading Partner Configuration (as a sender), we observed the following error in Windows event log. What is the resolution for this?”

Error encountered during parsing. The X12 transaction set with id ” contained in functional group with id ‘25′, in interchange with id ‘000000025′, with sender id ‘CA000CA ‘, receiver id ‘APRESS1234 ‘ is being suspended with following errors:
Error: 1 (Miscellaneous error)
Missing or invalid or duplicate Transaction set identifier ‘http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_810′
 

A: This error, unfortunately, could mean a variety of things. Sometimes, when an EDI document is invalid – such as the segments in the ISA header are not sized properly (meaning, for example, there are 15 characters that are requires in the sender and receiver IDs (ISA6 and ISA8), if you accidentally leave a space or two out, it will mess up the whole doc and result in an error like this).

After validating that the doc is valid against its schema, the next step would be to manually increase the set ID and see if that works when the doc is submitted. If so, you can turn off the set id settings in the EDI properties (at the bottom of the configuration screen with all the settings for ISA, etc.) In the following example:ISA*00* *00* *01*TRADPART1 *ZZ*BASECOMP12 *070407*1555*U*00401*000000025*0*T*>~

Try changing the 1555 to 1556 and the 00000000025 to 0000000026 (or a new, unique number). Also change these same values in the rest of the doc (you may see them in ST01 and in the Footer. Change these manually to validate it solves the problem.

 

Microsoft TechEd, Orlando 2008

Posted in EDI, Miscellaneous on February 13, 2008 by mdbeckner

I will be giving two sessions related to BizTalk 2006 R2 during the TechEd conferences in Orlando this summer. The descriptions are as follows:

1. Building EDI Solutions in BizTalk Server 2006 R2

With the release of BizTalk Server 2006 R2, true enterprise level EDI functionality has been introduced into the platform. Seasoned developers familiar with BizTalk implementations but inexperienced with the EDI components, and new developers looking at understanding how BizTalk can solve their EDI needs will both find value in looking in detail at the different aspects of BizTalk EDI development. This session will introduce working with EDI schemas and documents, configuring trading partners, mapping data, and delivering EDI documents (via the VAN or AS2). Witness a full end to end solution being developed, and walk away with a rich understanding of the skills required to successfully engage in this type of development.

2. EDI and BizTalk Server 2006 R2: Successful Trading Partner Management

The vast majority of B2B commerce is done using the EDI standard, and this continues to increase annually. Organizations are looking at ways to migrate their current solutions to more scalable, robust, and affordable enterprise platforms which will support this increasing workload. As the primary contender in this space, BizTalk Server 2006 R2 has extensive capabilities for supporting EDI, and it is essential to have the skills necessary to architect and develop BizTalk EDI solutions. This session will give an overview of the role that BizTalk parties play in EDI processing and will explore in detail, through walkthroughs and real world scenarios, the most effective means of configuring and managing trading partners. Key takeaways from this session will include best practices in implementing trading partners in BizTalk EDI solutions, understanding the difficulties associated with managing large numbers of trading partners, and considerations to take into account when scaling in order to support these larger implementations.

Pro EDI in BizTalk Server 2006 R2

Posted in EDI on February 13, 2008 by mdbeckner

Apress recently released my latest book, Pro EDI in BizTalk Server 2006 R2. It traces through the implementation of an EDI solution, including schema development, trading partner configuration, and document delivery (FTP and AS2).

This should be of interest to anyone looking at migrating from existing EDI solutions to BizTalk, or to the BizTalk developer looking to get a grasp on the new features of R2.

Don’t let the concept of EDI bore you; though an old standard, the demand in the marketplace is enormous. EDI constitutes nearly 90% of all B2B commerce; there is a huge demand for this skillset, and developers interested in opening up a vast array of opportunities should look into becoming familiar with the way in which it is implemented in BizTalk Server.