Friday, November 17, 2017

Logic Apps and EDI (VII). Problems developing a PRO solution

This post is about the problems that I found developing a real solution for a customer.

This months I was developing a migration from a BizTalk EDI solution to a Logic Apps EDI solution.

First Problem
The first problem and the easiest to resolve, was that I began to develope my solution with Visual Studio 2017 and this version of Visual Studio hadn't Microsoft Azure Logic Apps Enterprise Integration Tools for Visual Studio 2015 2.0, it only has Logic Apps tools for Visual Studio 2017.

The problem is that in Visual Studio 2017 with the Logic Apps tools, we can't create Integration Account projects, then we can't add schemas and maps.

The solution is easy, because we can use schemas and XSLTs generated with old Visual Studio versions.

Second Problem
In the Agreements of the Integration Account, there isn't an option similar to "EDIFACT Fallback Settings" that is in BizTalk solution. This is used when BizTalk has not determined the Agreement , is as a default Agreement, but on Azure solution there isn't.

I added  an entry on Logic Apps User Voice:
Add "EDIFACT Fallback Settings” support in “Enterprise Integration Pack” and LogicApp

To resolve this, we had to add all posible Agreements on our Integration Account, when on BizTalk solution was only the main Agreements.

Third Problem
This is a big problem, because I think is an error and was about the Sender and Receiver Qualifier. On some EDI messages, it isn't mandatory the use of Sender and Receiver Qualifier. BizTalk has an option to specify "NotValued" as Qualifier.


I added another entry on Logic Apps User Voice:
Resolve EDI Agreement without Qualifiers

To resolve this, we had to modify the messages to add a default "ZZZ" Qualifier.

Fourth Problem
Then, when I decoded some production EDI files to test my solution, the decoder always generated "BadMessages" with this error:

"Error encountered during parsing. The Edifact transaction set with id '1' contained in interchange (without group)
with id '42089', with sender id 'PACHULI', receiver id 'POCHOLO' is being suspended with following errors:                  

Error: 1 (Miscellaneous error)
70:
Error: 2 (Miscellaneous error)
71: Transaction Set or Group Control Number Mismatch
Error: 3 (Miscellaneous error)
29: Invalid count specified at interchange, group, or message levels

But the files were correct. The problem was the use of UNH2.5 segment and the solution it is documented on this link:

How to handle EDIFACT documents having UNH2.5 segment

Fifth Problem
My final step, was mapping EDI files to internal company format, but when I want to compile the old maps with Visual Studio 2015, I get some odd errors like:

"The "Addition" functoid has 92 input parameter(s), but between 1 and 5 parameter(s) are expected."

Or simply a generic error in compilation.

The trick here is "Validate" the map in the old BizTalk project and use the generated XSLT in our Azure Integration Account.

No comments: