BizTalk Services – EDI Agreement Deployment Errors
May 21, 2014 1 Comment
This week I’ve been frustrated by “unknown exception” errors whilst trying to deploy an X12 EDI agreement to Windows Azure BizTalk Services. The generic message was of course extremely helpful in isolating the problem:
(“Error: An error occurred while deploying the agreement. Details: Service encountered an unknown exception..”)
It happened that a recent tweet by Microsoft MVP Sam Vanhoutte proved that I wasn’t alone in my angst, as did this entry on the MSDN Azure forum. Unlike SGSJWS however, switching browsers didn’t solve my issue. Sam’s helpful advice to check all configuration items, however, did eventually lead me to closer inspection where I discovered the cause.
In the Receive settings of the agreement, you need to specify at least one Routing rule to specify where a received EDI message should be sent. In my case, I wanted to route all success messages to a single queue (suspended messages get their own routing specification):
In order to satisfy the “Always Route” condition, I entered the typical logical comparison statement that should always equate to true (at least in my mathematical world):
(The need to use the “Advanced Definitions” section to specify such a simple and common condition of routing everything seems a bit ironic, but there it is…)
Unfortunately, I didn’t pay too much attention to the “SQL92” syntax hint, and instead took my queue from the syntax presented in the “Standard Definition” configuration section above, which uses the familiar logical double-equal (“==”) sign for equality comparisons. Bad move.
SQL92 syntax requires a single equals sign, not a double. It would have been nice to have a little validation at the time of saving this configuration (even just a little squiggly red line perhaps?), but unfortunately not. Instead you get the wonderful “unknown exception” error upon deployment.
Fixing up this syntax allowed me to successfully deploy:
Other than remembering to pay attention to the fine print and perhaps taking a crash course in SQL92 syntax, the real lesson to learn here is that deployment errors such as this are typically due to some minor configuration error. As Sam pointed out to me, you should even check that any credentials for Service Bus, etc. are all correctly identified, as these are validated at deployment time.
I hope this helps someone find the solution to their BizTalk Services deployment woes faster than I did. 🙂
Nice blogpost!