Application Integration Framework (AIF) is useful in Dynamics AX because it offers an extensible framework, providing support for multiple asynchronous and synchronous transports via Web services, and allowing reliable exchange of documents (in XML format), with other trading partners and systems. For purposes of this write-up, Dynamics AX shall be used to refer to Microsoft Dynamics AX.
Dynamics AX Application Integration Framework
A typical exchange begins with a document – a document class that fits the definition of Microsoft Dynamics AX business logic. After serializing the document into XML and adding header information to create a message – possible transferred into/out of your Dynamics AX system (also known as the local endpoint in AIF) – the endpoint takes part in the exchanges as the other entity. In AIF, the transaction types are known as actions: for instance, SendPurchaseOrder. Using forms found by clicking Basic -> Setup ->Application Integration Framework, you can set up and then configure endpoints and actions, including other elements of the exchange.
An asynchronous exchange, through an adapter, converts a document into the right format for exchange via a specific transport mechanism, for example Microsoft Message Queuing (MSMQ). Asynchronous adapter-based exchanges involve moving of documents into a queue to await processing by Dynamics AX batch job. They also require channel configuration for the AIF to use them. For asynchronous exchange, adapters support the following transaction types:
Send documents – Documents sent by Microsoft Dynamics AX to another system
Receive and Create Documents – Dynamics AX receives documents sent from another authorized system, goes to its database and creates new records
Respond to Queries (Read and Requests) –Dynamics AX handles requests for documents received from another authorized system by retrieving the requested information from the Dynamics AX database and then returning it to the requesting system, after appropriately filtering and ensuring security.
Similarly, Web services can be used to accomplish the same transactions. However, for you to use Web services for inbound documents, you need to install and configure it for application integration and another service i.e. Microsoft Internet Information Services (IIS) 6.0. It requires an adapter for an exchange to take place using outbound Web services (i.e. send a document for an installation of your own to another system). A Web service residing on the receiving end of that transaction is also required.
In the Basic section of Dynamics AX are configuration forms that can be used to configure the AIF. For adapter-based exchanges that are asynchronous, configure and control the Dynamics AX batch jobs that responsible for processing documents in the AIF queues. Synchronous processing is for exchanges configured to utilize inbound Web services. AIF permits multiple connections. Therefore, your Dynamics AX is able to support the processing of these document exchanges involving multiple partners while using multiple transport types concurrently.
Connections with Asynchronous Adapters Enabled by the Functionality in Dynamics AX
1.Microsoft Message Queue (MSMQ)
Note: To send documents using this connection, use a domain A/C for the AOS A/C
2.File system – exchanged documents (to and from computer folders)
3.Outbound Web Services
Inbound Web services support synchronous document exchange. For the highest level of security, ensure that Web services are deployed on your intranet only. For any deployment of Web services other than within your intranet, additional middleware will be required to ensure security.
Send and receive documents and data
Using outbound exchanges in AIF enables you to send documents and useful data to trading partners. On the other hand, you can also receive documents and valuable data from endpoints – through an inbound exchange.
Sending documents and data
This can be initiated easily by clicking a button, such as Send button on the chart of accounts form (to send electronically).
Receiving documents and data
Receiving documents means that an inbound transfer data is added, altered, or deleted in the Dynamics AX database. Therefore, caution should be exercised when proceeding to help ensure your Dynamics AX system security is not compromised when configuring the Dynamics AX users that are associated with an endpoint. This ensures that your organization can trust the users.
Create a connection
Whether you use Web services or an adapter-based exchange (MSMQ, outbound Web services or file system) to exchange documents, you must do the following:
1.Negotiate agreements with trading partners/ third parties on documents or data exchange represented in the Dynamics AX database.
2.For application integration, install Web services using the Dynamics XA setup program and Microsoft IIS 6.0 (install and configure) if you are considering setting up exchanges that use the inbound Web services.
3. You use the forms found at Basic -> Setup – >Application Integration Framework to configure the connection.
4. When configuring asynchronous adapter-based exchanges (incl. outbound Web services) or synchronous exchanges via inbound Web services, you may use a completely different set of steps.
5. Carefully do consider the resources utilized in the transfer, including the effect on that particular transfer on performance. Moreover, you have the option of setting the maximum batch size (which you may set to unlimited) so that the number of messages that are processed from a single queue by a batch job at any given time is properly controlled. Alternatively, you can choose to set the maximum locking interval (the maximum amount of time in minutes that both channels and endpoints can be locked during processing).In the absence of special circumstances, such as huge or tiny messages, use the default and monitor how your system is performing, and change the max locking interval accordingly.
6. Maintaining and troubleshooting connections: This can be done by viewing messages in queues, including information (especially when exceptions occur). Use the Document history, Queue manager, and Exceptions forms which you can find by clicking Basic -> Periodic -> Application Integration Framework.
AIF enables companies to not only integrate, but also communicate (electronically) with other partners and business processes. It enables more secure Application-to-Application and Business-to-Business integration scenarios. It also provides a Web services interface for synchronous document exchange.
This interface offers a seamless integration experience for clients using Microsoft .NET, as well as other Web clients. In the Application Integration Framework, the Dynamics AX business logic automatically generates the Web services to allow amateur developers (those with limited experience) to easily create or develop their own Web services.