Microsoft BizTalk Server and Microsoft Dynamics AX Integration – Part 4.1 – Error Handling with BizTalk Administration


Categories of Exceptions related to BizTalk / Dynamics AX Interfaces

1. When error Event Source: “Microsoft Dynamics AX adapter

a. Refer the Microsoft Dynamics AX Server Event Log for more details

b. Refer the Microsoft Dynamics AX Exceptions

2. When error Event Source: “Microsoft BizTalk Server” / “EAI.BizTalk

a. This category of error is related to some error in Transformation, Orchestration or Transport.

b. Refer the BizTalk Administration Console for more details.

 

Microsoft BizTalk Server

(Event Source: “Microsoft BizTalk Server” / “EAI.BizTalk”)

This section provides the information on the exceptions that gets logged by BizTalk in case of erroneous conditions for Microsoft Dynamics AX interfaces.

All the Exceptions that occur in Microsoft BizTalk Server are logged in Event Log of the BizTalk Server machine. These exceptions are logged on the Machine based upon the Host Instance configuration.

Apart from the Error / Detailed exception the Message / Orchestration also gets “SUSPENDED as either Resume-able or Non-Resume able state based upon the category and nature of the Exception.

The following sections detail the steps to be followed in case the error Event Source is “Microsoft BizTalk Server” / “EAI.BizTalk”.

1. Error Handling for data being sent to Microsoft Dynamics AX from BizTalk Server

1. Error occurs in the Interface which sends data to Microsoft Dynamics AX.

a. Case I: If the error occurs while transforming the data received from the Source Systems into Canonical Message.

i. In this case the message would get suspended.

ii. The suspended messages can be retrieved using Microsoft BizTalk Server Administration Console.

image

iii. If the message needs to be replayed without any correction and is resume-able, then right-click click on the Suspended Message and click on “Resume Instance”.

iv. If the message needs to be corrected, then the data needs to be altered in Source System and reposted to BizTalk.

b. Case 2: If the error occurs after the data has been transformed into the Canonical

i. The Interface would output / dump the Canonical Message to a configured location as per the Send Error Port.

image

ii. After correcting the issue in the Canonical Message the file can be replayed using the configured Error Replay folder (check under “EnterpriseShared” BizTalk Application)

image

iii. Rename the Canonical as “ForInterfacePopulateVendorInfoToDynamicsAX.xml”  and drop the File at above configured location (“C:\Project\ErrorReplay” folder). Microsoft BizTalk Server would route the corrected canonical to the right Interface and perform the required transformations.

2. Error Handling for data being received from Microsoft Dynamics AX into BizTalk Server

1. Error occurs in the Interface which receives data from Microsoft Dynamics AX.

a. Case I: If the error occurs while transforming the data received from the Microsoft Dynamics AX.

i. In this case the message would get suspended.

ii. The suspended messages can be retrieved using Microsoft BizTalk Server Administration Console.

image

iii. If the message needs to be replayed without any correction and is resume-able, then right-click click on the Suspended Message, and click “Resume Instance”.

iv. If the message needs to be corrected, then the data needs to be altered in Microsoft Dynamics AX and reposted (refer Section – Repost Messages)

b. Case 2: If the error occurs after the data received from the Microsoft Dynamics AX has been transformed into the Canonical (for Interface with Orchestration).

i. The Interface would output / dump the Canonical Message to a configured location as per the Send Error Port.

For example an interface which sends Invoice Information to Oracle. In case of BizTalk Error the Canonical XML or the message is outputted to “C:\Project\Error\IPublishInvoiceOnError\%MessageID%.xml

image

 

ii. After correcting the issue in the Canonical Message the file can be replayed using the configured Error Replay folder (check under “EnterpriseShared” BizTalk Application)

image

iii. Rename the Canonical as “ForInterfacePublishInvoice.xml”  and drop the File at above configured location (“C:\Project\ErrorReplay” folder). Microsoft BizTalk Server would route the corrected canonical to the right Interface and perform the required transformations.

b. Case 3: If the error occurs after the data received from the Microsoft Dynamics AX has been transformed into the Canonical (for Interface without Orchestration).

i. In this case the message would get suspended.

ii. The suspended messages can be retrieved using Microsoft BizTalk Server Administration Console.

image

iii. If the message needs to be replayed without any correction and is resume-able, then right-click click on the Suspended Message, and click on “Resume Instance”.

iv. If the message needs to be corrected then double click on any Suspended Message

image

v. Go to “Messages” tab.

image

vi. Double Click on the Message.

image

vii. Click on Body and copy the Message and store it on the Hard disk.

viii. Correct the message and rename the file as per the Interface (refer the Design Document for the corresponding Interface for the same)

ix. Drop the file at above configured location (“C:\Project\ErrorReplay” folder). Microsoft BizTalk Server would route the corrected canonical to the right Interface and perform the required transformations.

This explains what all can be done on BizTalk side in case there are issues related to the Dynamics AX port connection. In my next port I will describe how we can do the error handling on Dynamics AX – the message was successfully sent to Dynamics AX queue but failed to perform the required action.


Skip to main content