Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Using the Application Integration Framework (AIF) to integrate Microsoft Dynamics AX with external software systems

Dynamics AX 4.0

Application Integration Framework (AIF) provides an extensible framework that supports multiple asynchronous transports, as well as synchronous transport using Web services, to reliably exchange documents in XML format with trading partners or other systems.

An exchange starts with a document, that is, a document class defined using Microsoft Dynamics AX business logic. The document is serialized into XML and header information is added to create a message, which may then be transferred into or out of your Microsoft Dynamics AX system (called the local endpoint within AIF). The other entity taking part in the exchanges is called the endpoint. The transaction types are called actions in AIF: for example, SendPurchaseOrder. You set up and configure endpoints and actions and all the other elements of an exchange using forms found when you click > > .

An asynchronous exchange uses an adapter to convert the document into the proper format for exchange by means of a particular transport mechanism, such as Microsoft Message Queuing (also known as MSMQ). Adapter-based exchanges are asynchronous in that they involve moving the document into a queue where it waits for processing by a Microsoft Dynamics AX batch job. Adapter-based exchanges require configuration of a channel for use by the AIF. Adapters support the following transaction types for asynchronous exchange:

  • Send Documents - Microsoft Dynamics AX sends documents to another system

  • Receive and Create Documents - Microsoft Dynamics AX receives documents from another authorized system and creates new records in the Microsoft Dynamics AX database

  • Respond to Read and Query Requests - Microsoft Dynamics AX receives requests for documents from another authorized system, retrieves the requested information (whether a document or a list of documents) from the Microsoft Dynamics AX database, and returns it to the requesting system, with appropriate filtering and security

The same transactions can be accomplished by using Web services. Using Web services for inbound documents requires installation and configuration of Web services for application integration and Microsoft Internet Information Services (IIS) 6.0. An exchange using outbound Web services (that is, sending a document from your installation to another system) requires an adapter and the Web services that reside on the receiving end of the transaction.

You configure the AIF framework using the configuration forms found in the Basic section of Microsoft Dynamics AX. For asynchronous, adapter-based exchanges, you configure and control the Microsoft Dynamics AX batch jobs that process documents in the AIF queues. Exchanges configured to use inbound Web services are processed synchronously. AIF allows multiple connections. That is, your Microsoft Dynamics AX system can support the processing of document exchanges with multiple partners using multiple transport types simultaneously.

Microsoft Dynamics AX includes the functionality to enable connections with the following asynchronous adapters:

  • Microsoft Message Queue (MSMQ)

    ImportantImportant

    To send documents using MSMQ, you must use a domain account for the AOS account. For more information, see Install an Application Object Server (AOS) instance


  • File system (documents exchanged to and from folders on a computer)

  • Outbound Web Services

Synchronous document exchange is supported using inbound Web services.

To help ensure the highest level of security, deploy Web services on your intranet only. Deployment of Web services outside your intranet requires additional middleware to ensure security.

By using outbound exchanges in AIF, you can send documents and data to your trading partners. You receive documents and data from endpoints in an inbound exchange.

Send documents and data

Sending a document can be initiated by clicking a button on a form, such as the button on the form. For more information, see How to send and receive documents electronically and About sending and receiving documents electronically.

Receive documents and data

When documents are received in an inbound transfer data is added, deleted or changed in the Microsoft Dynamics AX database. For this reason, you should carefully consider how to proceed to help ensure the security of your Microsoft Dynamics AX system when configuring the Microsoft Dynamics AX users associated with an endpoint, making sure that the users are trusted by your business organization.

Whether you exchange documents using Web services or an adapter-based exchange such as MSMQ, file system, or outbound Web services, you must:

  • Negotiate agreements on document or data exchange with trading partners or third parties which are represented in the Microsoft Dynamics AX database.

  • Install Web services for application integration using the Microsoft Dynamics AX setup program and install and configure Microsoft IIS 6.0 if you intend to set up exchanges that use inbound Web services. See Install an application integration server and Configure IIS to work with Microsoft Dynamics AX Web services.

  • Configure the connection using the forms found when you click > > .

    You use a different set of steps when you configure asynchronous adapter-based exchanges (including outbound Web services) and synchronous exchanges using inbound Web services. For more detailed information about configuration, see the sections on configuring, below. See also Configuring document exchanges.

  • Carefully consider the resources used in the transfer and the effect of the transfers on performance. You can set the maximum batch size (or set it to be unlimited) to control the number of messages processed from a queue at one time by a batch job. You can also set the maximum locking interval, that is, the maximum time in minutes that the channels and endpoints are to be locked while processing. If you do not have any special circumstances, such as very large or very small messages, you can use the default, monitor your system's performance, and change the maximum locking interval accordingly.

  • Maintain and troubleshoot connections by viewing messages in the queues and information when exceptions occur using the , , and forms found by clicking > > . See Managing document exchanges.

A core installation of Microsoft Dynamics AX includes the software to enable adapter-based connections. After a connection is configured and processing initiated by starting the Microsoft Dynamics AX batch jobs, messages are exchanged between the local endpoint and the endpoint using the defined channel. The XML messages consist of the document and a header and can be viewed during the exchange as they appear on the queues.

After your company decides to exchange documents or data with a trading partner or third-party system, you must perform the following tasks.

  • Configure the local endpoint (your Microsoft Dynamics AX system). A local endpoint also determines the company that inbound messages are applied to. See Create and configure local endpoints.

  • Create and configure actions that define the transactions processed though the framework. Every action specifies a Microsoft Dynamics AX document and the direction of the transfer. For example, the SendPurchaseOrder action specifies that the Microsoft Dynamics AX Purchase Order document is to be sent to the endpoint. See Configure an action.

  • Choose a transport mechanism (MSMQ, file system, or outbound Web services) and perform any prerequisite configuration. See the following topics:

  • Configure the adapter and enable it for use in a channel. Adapters are custom software components that pass the document to a specific transport mechanism, for example, MSMQ. See Configure an adapter.

  • Create and configure a channel, specifying the adapter. Channels define the transport method and address, which enables messages to move in and out of the framework to reach the endpoint. See Configure a channel.

  • Define an endpoint for the trading partner or third party, which must be represented in the Microsoft Dynamics AX database. An endpoint is the destination for an outbound document and the source of an incoming document. See Configure an endpoint.

    NoteNote

    Endpoints are the conceptual entities at either end of a transaction. For example, a single endpoint may apply to multiple customers or vendors. If sales order confirmations must be sent to a chain of retail stores where each store is set up in the Microsoft Dynamics AX database as a separate customer, you can create a single endpoint which can be authorized for each of the individual stores.


  • Create endpoint action policies to define the actions (an action contains a document and an operation, for example SendPurchaseOrder) to be associated with an endpoint. See Configure endpoint action policies.

  • Create a data policy for each action on each endpoint. The data policy determines which of the document's data fields participate in the exchange. See Configure endpoint action data policies.

  • Optionally, define a pipeline to perform any optional document transformations, value substitutions, or custom operations. See Configure a pipeline. Optional value mappings are available for certain documents as well.

    NoteNote

    The pipeline is a configurable engine for processing XML documents as they enter or are sent from Microsoft Dynamics AX. The pipeline is composed of a series of individual pipeline components that are executed in sequential order to transform the XML document. Some generic pipeline components are provided with the Microsoft Dynamics AX installation. The architecture of the pipeline allows developers to create and configure new pipeline components.


  • Start and stop processing in the queues for adapter-based exchanges by setting up batch jobs to process the asynchronous channels (using forms found by clicking > > ). For more information, see Processing batch jobs and Start and stop the asynchronous Application Integration Framework (AIF) services.

The AIF also provides a Web services interface for exchanging documents synchronously. This interface provides a seamless integration experience for Microsoft .NET and other Web clients. The Web services are generated automatically from the Microsoft Dynamics AX business logic, so that developers with limited Web experience can easily create their own Web services.

After your company decides to exchange documents or data with a trading partner or third-party system using Web services, the following tasks must be performed.

  • Install Web services for application integration.

    See Install an application integration server.

  • Configure IIS for Web services.

    This includes specifying the folder where Web services will be installed using the Microsoft Dynamics AX setup wizard, using IIS and Windows administrative tools to set up the Application Pool, to configure security settings, and to create the virtual directory for Web services. See Configure IIS to work with Microsoft Dynamics AX Web services.

  • Create a record for the Web site and enter its virtual directory share path using the form from a Microsoft Dynamics AX client.

    See Configure Web sites for document exchange.

  • Configure the local endpoint (your Microsoft Dynamics AX system).

    A local endpoint also determines the company that inbound messages are applied to. See Create and configure local endpoints.

  • Create and configure actions that are used to generate Web services.

    Every action specifies a Microsoft Dynamics AX document and the direction of the transfer. For example, the SendPurchaseOrder action specifies that the Microsoft Dynamics AX Purchase Order document is to be sent to the endpoint. See Configure an action.

  • Generate Web services for the actions.

    See Create Web services for an action.

  • Define an endpoint for the trading partner or third party, which must be represented in the Microsoft Dynamics AX database.

    An endpoint is the destination for an outbound document and the source of an incoming document. See Configure an endpoint.

    NoteNote

    Endpoints are the conceptual entities at either end of a transaction. For example, a single endpoint may apply to multiple customers or vendors. If sales order confirmations must be sent to a chain of retail stores where each store is set up in the Microsoft Dynamics AX database as a separate customer, you can create a single endpoint which can be authorized for each of the individual stores.


  • Create endpoint action policies to define the actions (an action contains a document and an operation, for example SendPurchaseOrder) to be associated with an endpoint.

    See Configure endpoint action policies.

  • Create a data policy for each action on each endpoint.

    The data policy determines which of the document's data fields participate in the exchange. See Configure endpoint action data policies.

  • Optionally, define a pipeline to perform any optional document transformations, value substitutions, or custom operations.

    See Configure a pipeline. Optional value mappings are available for certain documents as well.

    NoteNote

    The pipeline is a configurable engine for processing XML documents as they enter or are sent from Microsoft Dynamics AX. The pipeline is composed of a series of individual pipeline components that are executed in order to transform the XML document. Some generic pipeline components are provided with the Microsoft Dynamics AX installation. The architecture of the pipeline allows developers to create and configure new pipeline components.


The pipeline is a configurable engine for processing XML documents as they enter or are sent from Microsoft Dynamics AX. The pipeline is composed of a series of individual pipeline components that are executed in order to transform the XML document. Some generic pipeline components are provided with the Microsoft Dynamics AX installation. The architecture of the pipeline allows developers to create and configure new pipeline components.

  • With value lookups, you can substitute one character string for another in any field of a document. You can configure value lookups using the AifValueSubstitutor pipeline component. See Creating and configuring a pipeline.

  • You can also create value lookups for any field, if you know the data type for the field. After creating a value lookup table using the form, you associate that value lookup table to the pipeline component by entering an identification number in the field when you configure the pipeline component.

  • You can set up optional pre-defined value mapping that is available for certain documents on the form. The value mappings are pre-defined for each document, and arise from the associated business logic. You can map the values used for the active action policy and for the particular endpoint such as item number, customer account number, vendor account number and terms of delivery.

Maintaining integration includes the following tasks:

Show:
© 2015 Microsoft