Beruflich Dokumente
Kultur Dokumente
Workflow
approval via
email
This document highlights the functionality in
Microsoft Dynamics AX 2012 that enables the
configuration of workflows that let users take
approval actions directly from email
messages.
White paper
November 2013
Send feedback.
Overview 5
Appendix D: Configure the on-premises server with Microsoft Dynamics AX 2012 and the Microsoft Dynamics AX
Connector for Mobile Applications service 17
Appendix G: Considerations 23
What’s new
The Approval via email feature has been updated with the following functionality:
● Add comments when you approve or reject a workflow by using the new Approve and Reject links.
To use these new features, you must install the following hotfix: KB 2954087. If you’re using cumulative update 8 for
Microsoft Dynamics AX 2012 R3, you don’t have to apply the hotfix, because it’s included in that release.
You must also have the updated version of the Microsoft Dynamics AX Connector for Mobile Applications (the
connector).
Overview
The Microsoft Dynamics AX workflow infrastructure lets users configure workflows in application modules, with a
specific focus on tasks and approvals. As one of the workflow features, email messages can be configured and sent
that contain links to documents that require action. For example, an employee enters a timesheet, and then submits
it to his or her manager for approval. The manager receives an email message that requests approval. The email
message contains a link to the timesheet that the user entered. One of the most frequently requested capabilities for
this functionality has been for the manager or approver to be able to approve or reject from the email message itself.
In AX 2012, this functionality can now be enabled by applying a hotfix download and then installing the connector.
Note: This hotfix isn’t required if you’re using cumulative update 6 for Microsoft Dynamics AX 2012 R2 or a later
version.
This document explains the setup that is required to enable the feature. It also provides an example that shows how
to define a workflow that uses the new functionality.
The action URLs are designed to work in any email client, regardless of whether the email client is on the corporate
network (for example, on a desktop computer in the office) or off the corporate network (for example, on a mobile
phone or tablet). Therefore, the action URL is based on the capabilities of Microsoft Azure Service Bus. The Service
Bus relays the action from the client to the connector. The connector receives the action and then makes a call to
Microsoft Dynamics AX to record the action in the workflow. At that point, the action is completed in the workflow,
just as if the user were using the Microsoft Dynamics AX client or Enterprise Portal for Microsoft Dynamics AX.
1 Set up a Service Bus namespace, as explained in Appendix A: Create a new Service Bus namespace. If the
connector has already been installed so that it can be used with mobile applications, this step isn’t required.
2 If you’re using a version of AX 2012 R2 that is earlier than cumulative update 6, apply the hotfix that is provided
with the KB article, “Approver cannot approve or reject workflow workitems from email notifications directly in
Microsoft Dynamics AX 2012 R2.”
The hotfix isn’t required if you’re using cumulative update 6 or a later version.
3 Enable the inbound port and system account, as explained in Appendix D: Configure the on-premises server with
Microsoft Dynamics AX 2012 and the Microsoft Dynamics AX Connector for Mobile Applications service.
4 Provide the Service Bus namespace in the appropriate workflow parameter field, as explained in Appendix E:
Configure Service Bus namespace details in the workflow parameters.
5 Install the connector, which is available at https://mbs.microsoft.com/customersource/northamerica/AX/news-
events/news/MSDYN_MobileAppsAX, as explained in the Set up the Microsoft Dynamics AX Connector for Mobile
Applications service section. If the connector has already been installed so that it can be used with mobile
applications, this step isn’t required.
6 Make sure that the workflow is set up to send workflow instructions via email. For more information about email
functionality and workflows, see the following TechNet articles: Configure email functionality in Microsoft
Dynamics AX and Configure email settings for the workflow system.
Important: Step 6 is required for Microsoft Dynamics AX to send email notifications. If step 6 isn’t completed,
email won’t be sent.
1 Sign in to your legal entity, and then click Travel and expense > Setup > Travel and expense workflows.
2 On the Travel and expense workflows list page, on the Action Pane, click New.
4 In the Expense report workflow configuration form, add a conditional decision to the workflow.
a Select the Conditional decision control, and then, on the Action Pane, click Properties.
b Enter a name and condition. In this example, the workflow will let approvers approve or reject expense reports
from email messages if the total amount is less than or equal to 1,000.00 U.S. dollars (USD).
c When you’ve finished, close the Properties form.
6 Select the element that you just added, and then, on the Action Pane, click Properties. Enter a name, and then
close the Properties form. No changes are required on the Automatic actions, Notifications, and Advanced
settings tabs.
8 In the left pane, select the Step element, and then, on the Action Pane, click Properties.
9 In the Properties form, enter the instruction information.
Based on the condition that you defined earlier, if the total amount of the expense report is less than
1,000.00 USD, the approver will receive the instructions that you define in this step. In this scenario, the
organization wants approvers to be able to accept or reject expense reports from email messages.
The following instruction text is a recommendation. Substitute specific content that is approved by your
organization.
Please approve this expense report: %Expense report.ExpNumber% from %Expense report.CreatingWorker%
Please review and approve or reject the following expense report. You can use the approve or reject links in the
email or follow the more details link to approve it on the expense management website.
Please note there will not be a confirmation upon selecting approve or reject.
The following illustration shows an example of the Properties form, where work item approval information and
instructions have been added.
10 In the left pane, click Assignment, and assign users to the workflow step.
12 In the left pane, click Condition, and specify when the approval is required.
16 On the Action Pane, click Level down, or double-click the workflow element.
17 In the left pane, select the Step element, and then, on the Action Pane, click Properties.
Based on the condition that you defined earlier, if the total amount of the expense report is more than
1,000.00 USD, the approver will receive the instructions that you define in this step. Because of the expense report
total, the organization has decided that approvers should review the expense reports before they take action.
Approvers are directed to the portal where they can review the expense reports and then take action.
The following instruction text is a recommendation. Substitute specific content that is approved by your
organization.
Please review and approve this expense report: %Expense report.ExpNumber% from %Expense
report.CreatingWorker%
Please review the following expense report. Use the link to the portal which will provide you specifics for this expense
report. You can accept or reject the expense report from the portal.
19 In the left pane, click Assignment, and then, on the Assignment type tab, select User.
21 On the Completion policy tab, select whether approval from one approver, multiple approvals, or all approvers is
required.
22 In the left pane, click Condition, and specify when the approval step is required.
23 Close the Properties form.
25 Click Save and close to close the form and activate the workflow.
1 Start Azure PowerShell. For more information, see Overview of Azure PowerShell.
2 At the command prompt, enter the following command to connect Azure PowerShell to your Azure subscription.
Login-AzureRmAccount
3 Enter the following commands to learn the subscriptions that are available and then select one of them.
Get-AzureRmSubscription
Select-AzureRmSubscription -SubscriptionId <"subscriptionId">
The Service Bus namespace that you create here will be entered as the Azure Service namespace value in the
connector parameters.
Property Description
Name: [Name]
Region: [Region]
DefaultKey: 2pRUX4K5EhE5XKvDsaS+816/Neezztkgur/CKsib40w=
Status: Active
CreatedAt: 8/26/2014 7:24:31 PM
ServiceBusEndpoint: https://name.servicebus.windows.net/
ConnectionString: Endpoint=sb://SBName.servicebus.windows.net/;SharedSecretIssuer=own
er;SharedSecretValue=2pRUX4K5EhE5XKvDsaS+816/Nrqzztkgur/CKsib40w=
For more information about configuring Microsoft Dynamics AX rapid start connector, see Configure the
Microsoft Dynamics AX environment for Companion Apps..
The SAS policy name that you create here will be entered as the Azure service identity name value in the
connector parameters.
5 Select the new shared access policy (SendListen), and copy the primary key that should be used as the Azure
service identity password value in the connector parameters.
1 Skip the steps to create a new Service Bus namespace, because you completed those steps in Appendix A: Create
a new Service Bus namespace.
2 Complete the steps to configure AD FS for authentication.
3 Complete the steps to update the relying party federation metadata.
4 In the Select service operations form, in the Remaining service operations list on the right, select
SysWorkflowApprovalService.applyUrlAction. Then click the left arrow button (<) to add the operation to the
Selected service operations list on the left.
https://mbs.microsoft.com/customersource/northamerica/AX/news-events/news/MSDYN_MobileAppsAX.
Version 8.2.384 (August 2018) is required for any installations after August 2018 that use shared access signatures
(SAS) instead of the Azure Access Control service (ACS).
Prerequisites
● Make sure that the service account user that you created in the Create and configure a user account section is an
administrator or part of the Administrator group on the computer where the connector is running.
● Only one instance of the connector can be deployed to run on a computer.
Installation
1 Click Start > All Programs > Microsoft Dynamics AX Connector for Mobile Applications, and start the
Microsoft Dynamics AX Connector for Mobile Applications Setup Wizard.
2 Select the I accept the terms in the License Agreement check box, and then click Next.
3 On the Destination Folder page, accept the default folder location for the connector, or click Change to select
another location. Then click Next.
4 On the Service account page, in the Account name and Password fields, enter the name and password for the
user account that you previously created, and then click Next.
5 Click Install.
6 Click Finish.
7 Click Start > Administrative Tools > Service to open the Services list.
9 On the Start menu, click the Microsoft Dynamics AX Connector for Mobile Applications shortcut. The
graphical user interface (GUI) for configuring the connector parameters appears.
10 Use the information in the following table to configure the connector parameters.
Parameter Configuration
Azure service Enter the service namespace that you set up in Appendix A: Create a new Service Bus
namespace namespace, and then click Save.
Azure service identity Enter the service identity name that you set up in Appendix A: Create a new Service
name Bus namespace.
Azure service identity Enter the 256-bit symmetric key for the service identity that was generated in
password Appendix A: Create a new Service Bus namespace.
Important: Don’t use the WSDL port, 8101, as the endpoint URI of
EmailApprovalsServices. Port 8101 is used as the default inbound port for an
instance of AOS.
Note: There might be additional fields that aren’t required for ADFS workflow approvals. Leave those fields set to
their default values.
11 When you’ve finished entering values for the parameters, click Save.
12 After the connector parameters are saved, click Start in the GUI. You can see that the status has changed to
Started. You can also see that the Microsoft Dynamics AX Connector for Mobile Applications service is now
running, and that it’s listening on the Service Bus.
1 Click System Administration > Setup > Workflow > Workflow parameters.
2 In the Settings for workflow form, in the Base URL to approve/reject workflow field, enter the Service Bus
details in the following format:
https://namespace.servicebus.windows.net/Email
Replace namespace with the namespace details that you set up in Appendix A: Create a new Service Bus
namespace.
1 Follow the steps in Appendix A: Create a new Service Bus namespace to create a new SAS Service Bus.
2 Follow the steps in Appendix B: Configure shared access policies, so that you can provide the key as the Azure
service identity password in the connector parameters.
3 Install the latest connector (8.2.384.0), and update the Azure service namespace, Azure service identity name, and
identity password from the previous steps.
Note: The latest connector is not backwards compatible with ACS. Once the latest update is applied it will no
longer work with ACS. The previous ACS solution is set to be deprecated on Nov 7, 2018.
4 In AX 2012, In the Settings for workflow form, update the Base URL to approve/reject workflow field with the
details of the new Service Bus.
● The action URL that is included in the email message isn’t authenticated to the intended user. Any user who has
access to the message can click the action link. For example, if a user forwards the message to another user, the
new recipient of the message can complete the approve or reject action. We recommend that the email message
include a reminder not to forward it. As a mitigation, each action URL can be used only one time. Therefore, if a
message is inadvertently forwarded, only one action can be completed.
● The call to the Service Bus via the action URL isn’t authenticated. However, the action URL includes a secret
globally unique identifier (GUID). This secret GUID is of considerable length and is required to take the approve or
reject action. The connector also applies throttling if it detects repeated failed attempts. The Application
Integration Framework (AIF) service requires that a valid GUID (such as the GUID that is embedded in the action
URL) be presented. This requirement helps protect the AIF service. If the GUID isn’t valid, no action is taken.
Date Description
September 2014 ● Corrected inconsistent use of parameter names in the instructions for installing the
connector. All instances have been changed to EmailApprovalsServices.
● Added content to indicate that the hotfix that is available from KB 2827196 isn’t
required for cumulative update 6 for AX 2012 R2 or later versions.
● Added a note to indicate that the WSDL port, 8101, should not be used as the
endpoint URI of EmailApprovalsServices, because it’s used as the default inbound
port for an instance of AOS.
September 2018 ● Added support for SAS based service bus for workflow approval via email feature.