Messaging in Ax
Messaging in Ax
2012]
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft
Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
An action message is a system-generated suggestion to change an existing planned order.
Action messages are generated by the master scheduling calculation in response to changed
requirements. For example, the due date or quantity may have changed because an order
was firmed. You decide whether to make the changes that are suggested.
You can configure how action messages are calculated for a coverage group that you attach
to an item.
Message
Description
Advance
One or more planned orders should be moved forward in time. If you select this message, in the
specify the maximum number of days between orders that are advanced.
Postpone
One or more planned orders should be postponed. If you select this message, in the Postpone m
maximum number of days that are permitted between orders that are postponed.
Decrease
Production orders, purchase orders, and other receipt transactions should be decreased to preve
Increase
Production orders, purchase orders, and other receipt transactions should be increased to preven
Derived
actions
Actions that are derived from requirements can be transferred to component items.
Important
To send documents using MSMQ, you must use a domain account for the AOS account. For more information,
(AOS) instance.
To send documents using MSMQ, you must install MSMQ on a computer in your network and
create at least one public queue.
Note
Whenever the word "queue" is used in this topic, it refers to a queue created and maintained using MSMQ.
To receive documents using MSMQ, you must install MSMQ and create at least one queue on
a computer that has Application Object Server (AOS) installed, and that has been configured
to run the AIF batch jobs. For more information about these batch jobs, see Start and stop
the asynchronous Application Integration Framework (AIF) services.
To configure the MSMQ adapter (AifMSMQAdapter) for use in a channel, see Configure an
adapter and Configure a channel.
2. Create a queue
A queue for inbound messages can be either private or public; a queue for outbound
messages must be public.
1. Click Start > Settings > Control Panel > Administrative Tools > Computer
Management.
2. Under Services and Applications, expand the Message Queuing folder.
3. To create a new public queue, right-click the Public Queues folder and
click New > Public Queue.
4. To create a new private queue, right-click the Private Queues folder and
click New > Private Queue.
Any queue used for receiving messages must be located on the same computer as
the AOS that is configured to run the batch jobs that operate on the AIF queues. For
more information, see Start and stop the asynchronous Application Integration
Framework (AIF) services.
5. Enter a name for the queue.
6. Click the Transactional check box.
7. Click OK.
For outbound queues, set the ACLs to select Allow on Send Message, Get
Properties, and Get Permissions for the Anonymous Logon user.
Select Allow on Receive Message and Peek Message for endpoint users only.
If the inbound queue is not on the same machine as the AOS, then two additional
entries need to be added to the queue's ACL. First, add the account for the AOS
computer (for example, domain\computer-name$), and select Allow on Peek
Message and Receive Message. Second, grant the Peek Message and Receive
Messagepermissions for the Anonymous Logon.
6. On the Security tab, click Advanced.
7. On the Owner tab, set the Current owner of this item: to be the logged-in user
who performs the document exchange.
8. Click OK to exit the menus.
9. Log off and then log back on to the computer.
The tag names in the <Body> section vary between different types of inbound and
outbound messages. The tags that are required in the <Body> section for Microsoft
Dynamics AX document services depend on which service operation is specified in
the <Action> tag in the <Header> section.
This topic has not yet been rated - Rate this topic
Updated: June 18, 2012
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack,
Microsoft Dynamics AX 2012
This topic describes the <Header> tag section of inbound and outbound messages in
Application Integration Framework (AIF). For more information about AIF messages, see AIF
Messages.
Note
This topic has been updated to include information about features that were added or changed for Microsoft Dy
Microsoft Dynamics AX under the installation directory. For more information, see Messages
and transforms in AIF.
Tag name
Inbound description
Outb
<MessageId>
The s
each o
The value is a GUID that is not case sensitive. As an option, the value can
be bounded by braces (the two characters {}).
The value is replicated in the <RequestMessageId> tag of the
corresponding outbound message. You can use this value to locate the
particular message on the Exceptions, Queue manager,
and History forms. For more information, see Monitoring services and AIF.
By default, the inbound message is rejected if the system has seen this
same <MessageId>value before for create, delete,
and update service operations for the document services included with
Microsoft Dynamics AX. For more information, see How to: Enable
Checking for Duplicate Messages.
<LogonAsUser>
The in
messa
<Company>
This is a string value that identifies the company to use when you are
retrieving data in a query from Microsoft Dynamics AX.
If no company is specified, the default company is used.
<Action>
If an
the <
value
corres
This t
inbou
The value is a string that contains information that uniquely identifies the
service operation to the system.
<ConversationId>
The s
inbou
<RequestMessageI
d>
AIF p
inbou
to det
corres
<PartitionKey>
This is a string value that specifies the partition for the data that is used in
the service operation.
If an
the<P
that v
The default value for PartitionKey is the data partition that is set for the
calling user. For more information about data partitions, see Data
partitioning architecture.
This option is available only if Microsoft Dynamics AX 2012 R2 is
installed.
the co
This o
Dyna
Element
Location in AOT
Namespace
http://schemas.microsoft.com/
dynamics/2008/01/services/
Service Name
CustomerService
Service
Operation
read
The items specified in the <Action> tag determine the XSD schemas that the <Body> tag
contents must comply with.
Service operation
name
Description
create
delete
find
Reads complete data from records that match the specified fields and values.
findKeys
Reads the key values from records that match the specified fields and values.
read
Reads complete data from records that match the specified key values. Read is a sub
update
Modifies data in existing records, which are selected by the specified key values.
getKeys
Returns only the key values for the entities returned in a query.
getChangedKeys
Returns only the key values for the entities that have changed after the specified time
Each type of <Action> message can affect zero, one, or many records.
For more information about service operations for document services, see Document Class
Service Operations.
This topic has not yet been rated - Rate this topic
Updated: June 18, 2012
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack,
Microsoft Dynamics AX 2012
This topic describes the <Body> tag section of inbound and outbound messages in
Application Integration Framework (AIF). The <Body> tag must follow the
closing </Header>tag. For more information about messages and their format in Microsoft
Dynamics AX, see Messages and transforms in AIF.
For examples of inbound and outbound messages, see Example of Inbound XML
Message and Example of Outbound XML Message.
Service operation
in<Action>
Create
<serviceExternalName>
<entityName>
<CustTable>
The following example shows the XML for a Create action for the LedgerJo
<Body>
Delete
<EntityKeyList>
o
<EntityKey>
Find
<QueryCriteria>
o
FindKeys, GetKeys,
GetChangedKeys
<CriteriaElement>
<QueryCriteria>
o
<CriteriaElement>
Read
Same as Delete.
Update
<EntityKeyList>
o
<EntityKey>
<serviceExternalName>
o
<entityName>
The <EntityKey> tag sequence must align with the <entityName> tag seque
Create
<EntityKeyList>
o
Delete
<EntityKey>
Find
<serviceExternalName>
o
<entityName>
<EntityKeyList>
o
<EntityKey>
Read
Same as Find.
Update
Same as Delete.
<EntityKeyList> Tag
The <EntityKeyList> tag section contains one or more <EntityKey> tags. The following is the
correct syntax for the <EntityKeyList> tag (with a line break added to improve this display).
<EntityKeyList xmlns = "http://schemas/microsoft.com/
dynamics/2008/01/documents/Message">
<EntityKey> Tag
Each record in a table is uniquely identified by its value in the key field. In some tables the
key is a set of two or more fields. The <EntityKey> tag section specifies the name and value
for each key field. Each <EntityKey> section identifies at most one record.
The service class specified in the <Action> tag determines the table (or data source) that
contains the records targeted by the <EntityKey>.
<EntityKey> Example
The following XML code is an example of the <EntityKey> tag section. It identifies the record
that has a value of 4507 in its AccountNum field. Not shown is XML code elsewhere in the
message that relates this <EntityKey> to the CustTable table.
Xml
<EntityKey xmlns = "http://schemas.microsoft.com/
dynamics/2006/02/documents/EntityKey">
<KeyData>
<KeyField>
<Field>AccountNum</Field>
<Value>4507</Value>
</KeyField>
</KeyData>
</EntityKey>
<serviceExternalName> Tag
This tag is named for the document service that is specified in the <Action> tag.
<entityName> Tag
This tag is the name of the table (or data source) that the inbound message operates
against. Nested under this tag are tags for each field in the table (or a subset of those field
tags).
Also, nested under this tag could be another <entityName> tag for a child table. This can
occur for create and update <Action> operations. For example, under
the<SalesOrderTable> tag there can be a <SalesLine> tag.
<QueryCriteria> Tag
The <QueryCriteria> tag section contains one or more <CriteriaElement> tags.
The <QueryCriteria> tag offers more flexibility than does the <EntityKeyList> tag. Unlike
the <EntityKeyList> tag, the <QueryCriteria> tag never occurs in an outbound message.
For more information, see Query Criteria Overview.
<CriteriaElement> Tag
For matching records, the <CriteriaElement> tag section can specify field-value pairs that
are not limited to key fields. The <CriteriaElement> tag also offers several operators beyond
the equals operator.
XSD Validations
The XSD schemas that are used to validate all parts of each message are stored in the
following directory where you installed Microsoft Dynamics AX:
For more information about XSD schema, see the following topics:
This topic describes the <QueryCriteria> tag in inbound messages for Application
Integration Framework (AIF). The <QueryCriteria> tag occurs in the <Body> tag section of
an inbound message. The <QueryCriteria> tag never occurs in outbound messages. For
more information, see Message Body.
The purpose of the <QueryCriteria> tag is to provide a flexible way to control which records
are returned from an inbound message. The <QueryCriteria> tag is valid only in messages
that have Find or FindKeys specified in their <Action> tag. The <QueryCriteria> section is
more flexible than the <EntityKeyList> section.
Note
All the tags are required except for <Value2>, which is required only when the Range operator is used.
Tag name
Description
<DataSourceName>
<FieldName>
<Operator>
<Value1>
<Value2>
The following sections provide more details about some of the tags in the previous table.
<Operator> Values
The following table shows all the operators that are recognized as valid <Operator> tag
values.
<Operator> value
Equal
==
NotEqual
!=
Greater
>
GreaterOrEqual
>=
Less
<
LessOrEqual
<=
Range
Note
The Range operator cannot be used to query hidden or locked ranges for a data source or field. For more infor
query range, seeQuery Properties.
XSD Validations
The <QueryCriteria> section is validated against an XSD schema. You can retrieve XSDs for
common schemas from the following directory where you installed Microsoft Dynamics AX:
Program files\Microsoft Dynamics
AX\60\Server\MicrosoftDynamicsAX\bin\Application\Share\Include
Example: Fault in an
Outbound Message [AX
2012]
Other Versions
This topic has not yet been rated - Rate this topic
Updated: January 10, 2012
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack,
Microsoft Dynamics AX 2012
When the Application Integration Framework (AIF) receives and processes an inbound
message, it generates an outbound message in response. If any error has occurred in
processing the message, the service can generate information about the error to include in
the response. This topic describes the <Fault> tag that occurs in outbound messages that
report an error in the corresponding inbound message.
XSD Validations
The <Fault> tag section is validated against the Fault XSD. You can retrieve XSDs for
common schemas from your Microsoft Dynamics AX installation. The path of the directory
resembles the following:
\Program files\Microsoft Dynamics AX\60\Server\<MicrosoftDynamicsAX installation
ID>\bin\Application\Share\Include