Now that the setup for sending data using AIF XML documents to AX is complete, we can also use the BizTalk adapter to retrieve data from Dynamics AX via this AIF module. This is done using the AIF Queue manager. Throughout Dynamics AX, there are Send electronically buttons that can allow you to push data into the AIF Queue with an Outbound direction. Similarly, asynchronous incoming messages have an Inbound direction parameter.
We found that rather than repeating code in several BizTalk solutions when you need to retrieve data from the AIF Queue, it's relatively simple to create a general solution to accomplish this. This solution will retrieve all data via the BizTalk Dynamics AX adapter by polling the Queue at a set interval of time. The minimum polling interval is 1 minute, thus any messages you put in the AIF Queue will not be immediately consumed by BizTalk. The complete solution (Chapter9-AXMessageOutflow) is included with...