Workflows - Installation and Configuration 2009

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

AX 2009

Workflows – Installation and Configuration

Sumit Loya
3/21/2009
Table of Contents

1. WORKFLOW INSTALLATION .................................................................................................................. 4


1.1 Prerequisites ................................................................................................................................. 4
1.2 Configure Workflow accounts ...................................................................................................... 4
1.3 Select a Web site for Workflow .................................................................................................... 5
1.3.1 Creating a new Site ............................................................................................................... 5
1.3.2 Using an existing site............................................................................................................. 5
1.4 Install Workflow ............................................................................................................................ 6
1.5 Add the Workflow Web site to the list of trusted sites ................................................................ 7
2. SETTINGS FOR WORKFLOW SYSTEM..................................................................................................... 8
2.1 Run the Workflow Infrastructure Configuration wizard ............................................................... 8
2.2 Settings for workflow .................................................................................................................. 12
2.3 Set up users ................................................................................................................................. 13
2.3.1 Setup users .......................................................................................................................... 13
2.3.2 Assign users to employee IDs.............................................................................................. 13
2.3.3 Set up the global address book feature .............................................................................. 13
2.3.4 Set up an organization hierarchy ........................................................................................ 13
2.4 Prepare to Configure Workflows ................................................................................................ 14
2.5 Available Workflow templates .................................................................................................... 15
2.5.1 Accounts Payable workflow templates ............................................................................... 15
2.5.2 Accounts Receivables workflow templates ........................................................................ 16
2.5.3 Expense Management workflow templates ....................................................................... 16
2.5.4 General Ledger workflow templates................................................................................... 17
2.5.5 Multiple workflows can be based on the same template .................................................. 17
3. CONFIGURE WORKFLOW SYSTEM ...................................................................................................... 18
3.1.1 Business Policy .................................................................................................................... 18
3.1.2 Set up approval and spending limits ................................................................................... 18
Create a limit type........................................................................................................................... 18
Specify a default limit amount for each job .................................................................................... 19
Specify a limit amount for each employee ..................................................................................... 21

Microsoft Dynamics AX 2009 Page | 2


3.1.3 Configure the Purchase Requisition Workflow ................................................................... 22
3.2 Test the Configured Workflow .................................................................................................... 36
4. MANAGING WORKFLOWS .................................................................................................................. 44
4.1 Status and History of Workflow Instances .................................................................................. 44
4.2 Cancel a workflow instance ........................................................................................................ 45
4.3 Resume a workflow instance ...................................................................................................... 45

Microsoft Dynamics AX 2009 Page | 3


1. WORKFLOW INSTALLATION
The sections below describe about pre-requisites, steps and procedures required to install workflow
system for AX 2009

1.1 Prerequisites
1. The user installing workflow system should be a member of the Administrators group in
Microsoft Dynamics AX.

2. Ensure that IIS (Internet Information Services) is installed and running

3. Ensure that the system on which workflow has to be installed has a static IP. Setup will not
configure the workflows if the IP configuration is not defined.

4. Ensure that all the instances of previous versions of AOS are stopped.

5. Software components you should install: Secure Sockets Layer (SSL) is recommended, but not
required, for the Workflow Web site. SSL is a protocol that allows Web servers and clients to
communicate more securely through the use of encryption. When SSL is not used, data sent
between the client and server is vulnerable to observation by anyone with physical access to the
network.

6. Software components the Setup wizard installs: If the following software components are not
installed on the Workflow Web server, the Microsoft Dynamics AX Setup wizard will install them
for you when you install Workflow.

a. Internet Information Services (IIS)


b. ASP.NET 2.0
c. Microsoft Dynamics AX .NET Business Connector

1.2 Configure Workflow accounts


Before installing Workflow, you must configure the Workflow system account and the Workflow
execution account. The following table provides information about these accounts.

Account Description To configure this account…

Workflow The Workflow Web Select a domain account or a Microsoft Dynamics AX user in
system account server uses this the System service accounts form (Administration  Setup
account to  Security  System service accounts). If you select a
communicate with domain account, the domain account must:
Microsoft Dynamics
AX. Be a dedicated account (used only for this purpose).
Have a password that does not expire.

Microsoft Dynamics AX 2009 Page | 4


Have minimal access to network resources.

Workflow This account is used for Select a domain account or a Microsoft Dynamics AX user in
execution running application the System service accounts form. If you select a domain
account business logic and account, the domain account must:
accessing Microsoft
Dynamics AX data. Be a dedicated account (used only for this purpose).
Have a password that does not expire.
Have minimal access to network resources.

1.3 Select a Web site for Workflow


When you install Workflow, you will be asked to select a Web site. You can create a new Web site for
Workflow, or you can install Workflow on an existing Web site. The following sections describe these
options.

Note: If the Web site you use for Workflow runs on a port other than port 80, you must add an exception
to Windows Firewall for that port. For more information about Windows Firewall, see the Windows
documentation.

1.3.1 Creating a new Site


If you want to create a new Web site for Workflow, note the following points:

If IIS is already installed on your server, create the Web site at this time. For instructions on how
to create a Web site, see the IIS documentation.

If IIS is not installed, the Microsoft Dynamics AX Setup wizard will install IIS for you when you
select Workflow. After the Microsoft Dynamics AX Setup wizard installs IIS, you can create a site
for Workflow as described above.

1.3.2 Using an existing site


You can install Workflow to an existing Web site that is used by other applications. However, you must
verify that Windows SharePoint Services or Microsoft Office SharePoint Server is not running on the site.
If you install Workflow on the Default Web Site in IIS, and you later install Windows SharePoint Services
or Microsoft Office SharePoint Server on the server, the SharePoint installation program will stop the
Default Web Site and create a new site that runs on port 80. This means you will have to:

Configure the Default Web Site to run on a different port.


Restart the Default Web Site.

Microsoft Dynamics AX 2009 Page | 5


1.4 Install Workflow
Use the following procedure to install Workflow. If you are installing other Microsoft Dynamics AX
components at the same time, the installation screens will vary based on the components you are
installing.

Note: When you install Workflow, the Setup wizard must be able to connect to a base installation of
Microsoft Dynamics AX (application files, AOS, and database) on which the initialization checklist has
been completed. The following procedure assumes that you are installing Workflow on a dedicated
server where no other Microsoft Dynamics AX components are installed.

1. Start the Microsoft Dynamics AX Setup wizard.

2. Step through the initial wizard pages.

3. On the Select installation type page, select Custom installation. Click Next.

4. On the Select components page, select Workflow. Click Next.

5. On the Install files page, specify where you want the Workflow application files installed. You
can accept the default location or click Browse to select a different location. Click Next.

6. On the .NET Business Connector: Select a display language page, select the language in which
you would like to first run Microsoft Dynamics AX. Click Next.

7. On the .NET Business Connector: Connect to AOS instance page, enter the name of the AOS
server. Click Next.

8. On the .NET Business Connector proxy account information page, enter the password for the
.NET Business Connector proxy account. Click Next.

9. On the Workflow: Configure IIS page, select the Web site you want to use for Workflow. (For
more information, see Select a Web site for Workflow.) Click Next. The Microsoft Dynamics AX
Setup wizard will:

a. Create a virtual directory for Workflow. The virtual directory, named


MicrosoftDynamicsAXWorkflow50, will be located under the selected Web site in IIS.
The content of the virtual directory will be located at \Program Files\Microsoft
Dynamics AX\50\Workflow.
b. Create an application pool for the virtual directory. The application pool, named
MicrosoftDynamicsAXWorkflow50, will run as the .NET Business Connector proxy
account.
10. On the Workflow: Specify an AOS account page, enter or select the account the AOS instance is
running as. If you have multiple AOS instances, specify the account for each instance. If an AOS
instance is running as the Network Service account, format the account name in the following
way: Domain\ComputerName$ Click Next.

Microsoft Dynamics AX 2009 Page | 6


11. On the Ready to install page, select the check box if you want to restart IIS after Workflow is
installed. Click Install.

12. When the installation is complete, click Finish to close the wizard.

1.5 Add the Workflow Web site to the list of trusted sites
After installing Workflow, you must add the URL of the Workflow Web site to the list of trusted sites on
the AOS server. This will enable the AOS server to communicate with the Workflow Web services.
Complete the following procedure on the AOS server.

1. Open Microsoft Internet Explorer.

2. Click Tools > Internet Options. The Internet Options window is displayed.

3. Click the Security tab.

4. Click Trusted sites.

5. Click the Sites button. The Trusted sites window is displayed.

6. Enter the URL of the Workflow Web site.

a. If the Workflow Web server is using SSL, the URL is


https://ServerName:PortNumber/MicrosoftDynamicsAX50.
b. If the Workflow Web server is not using SSL, the URL is
http://ServerName:PortNumber/MicrosoftDynamicsAX50 .
c. ServerName is the name of the Workflow Web server. PortNumber is the TCP/IP port
that the Workflow Web site is using.

7. Click Add to add the URL to the list of trusted sites.

8. Click Close to close the Trusted sites window.

9. Click OK to close the Internet Options window.

Microsoft Dynamics AX 2009 Page | 7


2. SETTINGS FOR WORKFLOW SYSTEM

2.1 Run the Workflow Infrastructure Configuration wizard


As part of setting up the Workflow system, you must run the Workflow Infrastructure Configuration
wizard.

Note: To run the Workflow Infrastructure Configuration wizard, you must belong to a Microsoft
Dynamics AX user group that has the AdminSetup security key enabled.

1. From a Microsoft Dynamics AX client, click Administration  Setup  Workflow infrastructure


configuration wizard.

2. The Welcome to the Workflow infrastructure configuration wizard page appears. Click Next.

3. The Locate the Workflow Web server page appears. Verify the URL of the Workflow Web site.

o If your Workflow server is using Secure Sockets Layer (SSL), the URL is
https://ServerName:PortNumber/MicrosoftDynamicsAX50 .
o If your Workflow server is not using SSL, the URL is
http://ServerName:PortNumber/MicrosoftDynamicsAX50 .

Microsoft Dynamics AX 2009 Page | 8


o ServerName is the name of your Workflow server. PortNumber is the port that the
Workflow Web site is using.
o Click Validate to verify that Microsoft Dynamics AX can communicate with the Workflow
Web site.
o After the URL has been validated, click Next.

4. The Configure the Workflow processing batch job page appears. This batch job retrieves
messages from the message queue and sends them to the Workflow server for processing.
Select a batch group (Create a new batch group for workflows if required) and click Next.

Microsoft Dynamics AX 2009 Page | 9


5. The Configure the workflow due date batch job page appears. This batch job reviews the
documents in the message queue and sends information about due dates to the Workflow
server for processing. Do the following:

o Select a batch group (Create a new batch group for workflows if required).
o Specify how often you want the batch job to run by entering a number of hours.
o Click Next.

Microsoft Dynamics AX 2009 Page | 10


6. Click Finish to close the wizard.

Microsoft Dynamics AX 2009 Page | 11


7. Verify that the batch jobs are created and are in “Waiting” state.

2.2 Settings for workflow


Setup the workflow parameters from Basic  Setup  Settings for workflow form. You can specify
following information in this form. Repeat this process for each company.

Field Description

Approval and task Select a template for e-mail notifications. Notifications will be sent to users
notifications when tasks or documents are assigned to them.

Workflow runtime Verify that the URL is correct.


URL
If your Workflow server is using SSL, the URL is
https://ServerName:PortNumber/MicrosoftDynamicsAX50 .
If your Workflow server is not using SSL, the URL is
http://ServerName:PortNumber/MicrosoftDynamicsAX50 .
ServerName is the name of your Workflow server. PortNumber is the
port that the Workflow Web site is using.
Reference The object for which a number sequence must be selected. Select a number
sequence code for the Configuration Id and Instance Id.
Note: The number sequence code that you select will be used to generate the
configuration IDs assigned to workflows. You can view the configuration ID of each
workflow on the Workflow configuration form.

Microsoft Dynamics AX 2009 Page | 12


2.3 Set up users
Before configuring workflows, you must set up Microsoft Dynamics AX users, assign the users to
employee IDs, and set up the global address book feature.

2.3.1 Setup users


Create all the required users from Administration  Users form. Ensure that each user is given proper
rights.

2.3.2 Assign users to employee IDs


After you set up users, you must assign each user an employee ID. This is done by specifying user
relations.

When you specify user relations, you identify a user's relationship to your organization. Users can be
internal, such as employees, or external, such as vendors, customers, or business relations.

1. Click Administration  Setup  User relations.

2. On the Overview tab, click the Wizard button. Complete the steps in the wizard.

2.3.3 Set up the global address book feature


The global address book feature allows you to share address book information (such as employee
names, addresses, and phone numbers) among companies.

The Global address book (GAB) can help you in understanding the relationships of people and
organizations associated within the company. For example, you may have a customer who is also a lead
in a marketing campaign, or you could have employees who are also listed as customers.

There are two ways that you can enter records in the GAB. When first entering a record for a person or
organization, you may not know how they will be interacting with the company or you may know that
they will apply more than one entity. When this is the case, you can create a record in the GAB and
enter the entity later. If you do know the entity that the person or organization will be, such as a
customer or competitor, you can create a record in the corresponding form. When you do this, a record
will automatically be created in the GAB.

2.3.4 Set up an organization hierarchy


To set up an organizational hierarchy, you must set up employees, jobs, and positions. This setup falls
under Human Resources Setup and falls out of the scope of this document.

Note: You need to ensure that you create Organizations and create jobs for each organization and attach
them to positions. These positions are then mapped to each employee.

Microsoft Dynamics AX 2009 Page | 13


2.4 Prepare to Configure Workflows
The best way to prepare for setting up the Workflow system is to create diagrams illustrating the
workflows that you want to create. We recommend that you draw each workflow using a software
program such as Microsoft Office Visio®, or by simply using pen and paper.

Your diagrams should indicate:

The order in which the workflow elements occur.


The users who are assigned to each task and approval step.
The conditions under which each workflow element is required.

For example, your diagrams may look similar to the following workflow diagram.

Microsoft Dynamics AX 2009 Page | 14


2.5 Available Workflow templates
The first step in creating a workflow is to select a workflow template as the base for your workflow. You
can then customize the workflow by adding and configuring tasks, approval processes, and sub-
workflow processes. The following templates are provided with Microsoft Dynamics AX.

Note: Creation of Workflows and workflow templates is out of the scope of this document. Creating a
workflow requires development and X++ knowledge. This document is solely meant to just install and
configure the workflow system. Creating a workflow shall be covered in another document.

2.5.1 Accounts Payable workflow templates


The Accounts Payable module provides the following workflow templates.

Workflow template Use this template to

Project purchase requisition Create project purchase requisition approval workflows.


approval

Purchase requisition Create approval workflows for purchase requisitions.


approval

Vendor bank remittance Create approval workflows for vendor bank remittance journals.
template

Vendor disbursement Create approval workflows for vendor disbursement journals.


template

Vendor draw promissory Create approval workflows for vendor draw promissory note journals.
note template

Invoice approval journal Create approval workflows for invoice approval journals.
template

Vendor invoice recording Create approval workflows for vendor invoice recording journals.
template

Invoice register template Create approval workflows for invoice register journals.

Vendor redraw promissory Create approval workflows for vendor redraw promissory note journals.
note template

Vendor settle promissory Create approval workflows for vendor settle promissory note journals.
note template

Microsoft Dynamics AX 2009 Page | 15


2.5.2 Accounts Receivables workflow templates
The Accounts Receivables module provides the following workflow templates.

Workflow template Use this template to

Customer bank remittance Create approval workflows for customer bank remittance journals.
template

Customer draw bill of Create approval workflows for customer draw bill of exchange journals.
exchange template

Customer payment template Create approval workflows for customer payment journals.

Customer protest bill of Create approval workflows for customer protest bill of exchange
exchange template journals.

Customer redraw bill of Create approval workflows for customer redraw bill of exchange
exchange template journals.

Customer settle bill of Create approval workflows for customer settle bill of exchange journals.
exchange template

2.5.3 Expense Management workflow templates


The Expense Management module provides the following workflow templates.

Workflow template Use this template to

Cash advance request Create approval workflows for cash advance requests in Expense
template Management.

Expense template Create approval workflows for documents in Expense Management.

Non-project line item Create approval workflows for non-project line items in Expense
workflow template Management.

Project expense line Create approval workflows for project expense line items in Expense
workflow template Management.

Microsoft Dynamics AX 2009 Page | 16


2.5.4 General Ledger workflow templates
The General Ledger module provides the following workflow templates.

Workflow template Use this template to

Allocations template Create approval workflows for allocations journals.

Daily template Create approval workflows for daily journals.

Eliminations template Create approval workflows for eliminations journals.

Fixed assets budget template Create approval workflows for fixed assets budget journals.

Post fixed assets template Create approval workflows for fixed assets journals.

2.5.5 Multiple workflows can be based on the same template


You can create multiple workflows that are based on the same template. For example, you could create
a purchase requisition workflow for each country or region in which you operate, such as Purchase
Requisitions Denmark and Purchase Requisitions Spain.

When you have multiple workflows that are based on the same template, you need to specify when
each workflow should be used. Continuing with the example, you would need to specify that:

Purchase Requisitions Denmark should be used when: country/region is DK (Denmark)


Purchase Requisitions Spain should be used when: country/region is ES (Spain)

Microsoft Dynamics AX 2009 Page | 17


3. CONFIGURE WORKFLOW SYSTEM
To see the working and configuration of workflows, we will take an Example of Purchase requisition
workflow and see how workflows work. For a more generic and detailed explanation on configuring
workflows please read Help  System and Application Setup  System and Application Setup 
System setup  Workflow setup  Configure a workflow chapter in the help system.

The section below describes the example business policy that we will be configuring for Purchase
requisition.

3.1.1 Business Policy


In a typical approval scenario someone creates a new transaction, like a purchase requisition and
submits it for approval, then the system determines if anyone s the user(s) and waits for them to
complete the approval.

When the Purchase requisition has been submitted it is validated against the configured business policy.
If the business policy is violated a Task is automatically created. The Task will create and assign a Work
Item to a user that can correct the issue. Once validated the purchase requisition must be approved.

The processes below describe the business policy for purchase requisition.

All purchase requisitions must have a valid vendor account assigned and no items must have a purchase
price of 0 (zero).

All purchase requisitions with a total amount less than USD 1000 can be automatically approved.

All purchase requisitions with a total amount greater than USD 1000 must be approved by the
Purchasing Manager.

This type of business policy falls under the category of “Hierarchy-based” work flows.

The next few sections describe about the setups required for implementing this business policy.

3.1.2 Set up approval and spending limits


You can set up approval limits and spending limits, and assign a task or approval step to employees
based on these limits. Complete the following procedures to set up approval and spending limits.

Create a limit type


A limit type is an approval limit or spending limit associated with a specific document type. For example,
you can create an approval limit for purchase requisitions, or a spending limit for expense reports.

Use the following procedure to create a limit type.

1. Open the Limit types form (Basic  Setup  Limit types).


2. Press CTRL+N to create a new line.

Microsoft Dynamics AX 2009 Page | 18


3. In the Limit ID field, enter an identification code for the limit. For example, if you are creating an
approval limit for purchase requisitions, you may want the limit ID to be PurchApprovalLimit.
The limit ID cannot contain any spaces.
4. In the Limit type field, select “Approval limit” or “Spending limit”.
5. In the Document type field, select the type of document this limit type applies to.
6. In the Description field, enter a description of the limit, such as Purchase requisition approval
limit.
7. Save your changes.

See the screen shot below for example

Specify a default limit amount for each job


Specify a default limit amount for employees in each job. For example, by default, you may not want
purchasing clerks to approve purchase requisitions that are greater than $1000. You may not want
purchasing managers to approve purchase requisitions that are greater than $50,000.

Use the following procedure to specify a default limit amount for a job.

1. Open the Jobs form (Basic Setup  Job).


2. Select a job and click Setup  Limit defaults. The Limit defaults form is displayed.
3. Press CTRL+N to create a new line.
4. In the Limit ID field, select a limit type.
5. In the Default limit field, enter the default amount employees in the selected job can approve or
spend (depending on the limit type you selected in the previous step).
6. In the Currency field, select the currency associated with the amount.
7. In the Active date field, enter the date that this default limit amount should go into effect.
8. In the Expiration date field, enter the date that this default limit amount should expire.
9. Save your changes.
10. Repeat this procedure for each job.

Microsoft Dynamics AX 2009 Page | 19


For our example you can set limit defaults for two jobs, one for purchasing agent and other for
purchasing manager. See the screen shots below

Purchasing agent

Purchasing Manager

Microsoft Dynamics AX 2009 Page | 20


Specify a limit amount for each employee
Specify a limit amount for each employee. The amount you enter during this procedure will override the
amount that you entered in the previous procedure.

Note: This setup is required ONLY if you want to override the limits defined on the job associated with
this employee.

For example, by default, you may not want purchasing managers to approve purchase requisitions that
are greater than $50,000. However, you want Inga, a senior purchasing manager, to be able to approve
purchase requisitions up to $100,000. In this case you can override the default limits specified on the job
associated with Inga.

Use the following procedure to specify a limit amount for an employee.

1. Open the Employee form (Basic  Common Forms  Employee Details).


2. Select an employee and click Setup  Limits. The Limits form is displayed.
3. Press CTRL+N to create a new line.
4. In the Limit ID field, select a limit type.
5. In the Limit field, enter the amount the selected employee can approve or spend (depending on
the limit type you selected in the previous step).
6. In the Currency field, select the currency associated with the amount.
7. In the Active date field, enter the date that this limit amount should go into effect.
8. In the Expiration date field, enter the date that this limit amount should expire.
9. Select the Active check box.
10. Save your changes.
11. Repeat this procedure for each employee.

See the screen shot below

Microsoft Dynamics AX 2009 Page | 21


3.1.3 Configure the Purchase Requisition Workflow
After configuring all the workflow, we can now start with configuring the business policy defined in the
section 2.6.1 as a workflow for purchase requisition. In order to configure the business policy, traverse
to path Accounts Payable  Setup  Workflow configurations. Follow the procedure described below:

1. Click on New or press Ctrl + N and select the template as “Purchase requisition approval”. Now
click on “Create configuration”

This creates a new workflow configuration and opens the configuration editor form.

2. On the General tab do the following


a. Set Name to My Purchase Requisition Approval
b. Specify an Owner of the workflow. (An owner is the user who can manage the workflow)
c. Click on button Create instruction
d. On this form you can do the following

Microsoft Dynamics AX 2009 Page | 22


i. Set the Message text: Type in “My purchase requisition ready for approval”.
Note: Message can be a combination of static texts and placeholders inserted
from Available placeholders list.
ii. Languages configured: Select the language that you will use when entering the
message text.

e. Click on “Ok” to save the instruction.


f. You can also set the conditions on which this workflow can be triggered or started. The
General tab of the form should look as shown below:

Microsoft Dynamics AX 2009 Page | 23


3. On the Details tab, select PurchReqComplete (Required) node from Workflow elements tree
and do the following:
a. In the Task details section of the Details tab, Click on Overview tab and specify
following information
i. Task name: Enter a unique name for the task say “Purchase Requisition
Complete”
ii. Click on Create subject and type “Purchase requisition policy violation” in the
subsequent form. Click on Ok to close the child form.
iii. Click on Create instruction and type “Verify that purchase requisition has all
required data” in the subsequent form. Click on Ok to close the child form.
iv. Set a time limit: Use the following steps to specify when this task must be
completed. Be aware that options that you select here will override the options
that you select on the Assignment and Escalation tabs. Specify when this task
must be completed. Select one of the following options:
Hours — if you select this option enter the number of hours in which this task must
be completed, and then select the calendar that your organization uses.
Days — if you select this option enter the number of days in which this task must be
completed, and then select the calendar that your organization uses.
Weeks — if you select this option enter the number of weeks in which this task
must be completed.
Months — if you select this option, select the day and week in which this task must
be completed. For example, you may want this task completed by Friday of the
third week of the month.

Microsoft Dynamics AX 2009 Page | 24


Years — if you select this option, select the day, week, and month in which this task
must be completed. For example, you may want this task completed by Friday of
the third week of December.

If the time limit is exceeded, the system will automatically act on the task. Specify
the action (Automatic action to take if timeframe is exceeded) that the system
should take. You may need to select a time and time zone, as well.

v. The form should look as shown below

b. In the Task details section of the Details tab, Click on Automatic actions tab and do the
following:
i. Check the Enable automatic actions check box.
ii. Click on the Green + ( ) symbol to add a new line to the condition.
iii. Now click on the field to the right of word “Where” and traverse to menu
Purchase Requisition. In this menu traverse to sub menu Purchase requisition
lines and select Vendor account.
iv. Now click on contains field and select “is not” operator.
v. Now enter a blank value in the field “Enter a value” (Just click on this field, this
is enough to enter a blank value).
vi. Click on the Green + ( ) symbol again to add a new line to the condition.

Microsoft Dynamics AX 2009 Page | 25


vii. Now click on the field to the right of word “Where” and traverse to menu
Purchase Requisition. In this menu traverse to sub menu Purchase requisition
lines and select Net amount.
viii. Now click on “=” field and select “<>” operator.
ix. Click on “Enter a value” field and enter value 0.00 (Zero).
x. For the Action field select value “Complete”.
xi. Click on Save icon to save the condition. The form should look as shown in the
screen shot below

xii. You can test the condition by clicking on the Test condition button. In the
subsequent form you can select a purchase requisition and click on Test. The
condition evaluates to TRUE which means that the task would have been
automatically completed for the selected purchase requisition. Close the form.

Microsoft Dynamics AX 2009 Page | 26


c. In the Task details section of the Details tab, Click on Assignment tab and setup values
for any one of the following options:
i. Click on Choose button and select option Role based as “Purchase Requisition
Complete Role”. (For our example set this value)
ii. Hierarchy based — Select this option if you want the task assigned to users in a
specific organizational hierarchy. In order for the system to retrieve a range of
names, you need to specify the starting point and ending point of the range.
To specify the starting point, select a person from the Start from list.
To specify the ending point, click Create stop condition.
The Workflow condition editor form is displayed. Enter a condition to indicate
where in the hierarchy the system should stop retrieving names.
Now that the system has retrieved a range of employee names from the hierarchy,
you need to specify which employees the approval step will be assigned to.
If you select Assign to all users retrieved, the approval step will be assigned to all
employees in the range.
If you select Assign only to last user retrieved, the approval step will be assigned to
only the last employee in the range.
If you select Do not assign to users that meet the following condition, the system
will not assign the approval step to users in the range who meet a specific
condition. Click Create condition to specify the condition.

iii. User based — if you want the task assigned to specific users, click this option
and select the appropriate users.
iv. Specify how much time a user has to complete this task. Select one of the
following options:
Hours — if you select this option enter the number of hours the user has to
complete the task, and then select the calendar that your organization uses.

Microsoft Dynamics AX 2009 Page | 27


Days — if you select this option enter the number of days that the user has to
complete the task, and then select the calendar that your organization uses.
Weeks — if you select this option enter the number of weeks that the user has to
complete the task.
Months — if you select this option, select the day and week by which the user must
complete the task. For example, you may want the user to complete the task by
Friday of the third week of the month.
Years — if you select this option, select the day, week, and month by which the
user must complete the task. For example, you may want the user to complete the
task by Friday of the third week of December.
If the user does not complete the task in the time allowed, the task is considered
overdue and will be escalated according to the options that you select on the
Escalation tab.

v. Click on “Ok” to close the form and save the settings.

d. In the Task details section of the Details tab, Click on Escalation tab and setup values for
any one of the following options:
i. Do not escalate: (Select this option for our example) Select this option if you
want the task to remain assigned to the current user. If the time limit specified
on the Overview tab is exceeded, the system will automatically act on the task.
(It will take the action that you specified on the Overview tab.)
ii. Set an automatic action: Select this option if you want the system to
automatically act on the task. From the list, select the action the system should
take.

Microsoft Dynamics AX 2009 Page | 28


iii. Escalate to one or more people: Select this option if you want to create an
escalation path. The system will automatically assign the task to the users listed
in the escalation path. If the users in the escalation path fail to act on the task in
the time allowed, the system will automatically act on the task. From the list,
select the action that the system should take.
e. In the Task details section of the Details tab, Click on Notifications tab and setup the
notifications that you may want to receive. For our example do not set any notifications
but if you want to set you can set notification for following events
i. Complete — Select this check box to send notifications when this task has been
completed.
ii. Delegate — Select this check box to send notifications when this task has been
assigned to another user.
iii. Escalate — Select this check box to send notifications when the assigned user
has failed to complete the task.
iv. Request change — Select this check box to send notifications when the assigned
user has requested a change to the document that was submitted.
v. For each event that you selected, specify who should receive notifications. Do
the following:
Select the event.
Click Choose. The Assignment form is displayed.
If you want notifications sent to all users in a specific user group, click the Role
based option and select the appropriate user group.
If you want notifications sent to specific users, click the User based option and
select the appropriate users.
Click OK to close the Assignment form.

vi. To enter the text of the notification, click Define and enter the text you want to
send with notification.
f. In the Task details section of the Details tab, Click on Advanced tab and setup allowable
actions for the workflow. In our case select all the actions. See the screen shot below

Microsoft Dynamics AX 2009 Page | 29


4. Now again on the Details tab, select PurchReqApproval (Required) in the Workflow elements
tree and do the following.
a. In the Approval details section of the Details tab, Click on Overview tab and specify
following information
i. Approval name: Enter a unique name for the approval say “Purchase
Requisition Complete”
ii. Set a time limit: Specify when this approval must be completed. Settings are
similar to as seen in the task configuration.
b. In the Approval details section of the Details tab, Click on Automatic actions tab and
do the following:
i. Check the Enable automatic actions check box.
ii. Click on the Green + ( ) symbol to add a new line to the condition.
iii. Now click on the field to the right of word “Where” and traverse to menu
Purchase Requisition and select Approval amount.
iv. Now click on “=” field and select “<” operator.
v. Now enter a value 1000 in the field “Enter a value”.
vi. Select Action as “Approve”.

Microsoft Dynamics AX 2009 Page | 30


vii. Click on Save icon to save the condition. The form should look as shown in the
screen shot below

c. Specify if you require any notifications to be received on the Notifications tab.


d. In the Approval details section of the Details tab, Click on Advanced tab and setup
allowable actions and final approver for the workflow:
i. Select the Require final approver check box and from the list, select the user
who will be the final approver.(Not required in our case)
ii. Select all the actions under the Allowable actions for the workflow section. The
form should look as shown below

Microsoft Dynamics AX 2009 Page | 31


5. Now again on the Details tab, select PurchReqApproval (Required) in the Workflow elements
tree. Click the + sign to expand PurchReqApproval. Select Step1 and do the following
a. In the Step details section of the Details tab, Click on Overview tab and specify
following information
i. Step name: Enter a unique name for the task say “Step 1”
ii. Click on Create subject and type “Purchase requisition is ready for approval” in
the subsequent form. Click on Ok to close the child form.
iii. Click on Create instruction and type “Review purchase requisition for
correctness and approve it” in the subsequent form. Click on Ok to close the
child form. The form should look as shown below:

Microsoft Dynamics AX 2009 Page | 32


b. In the Step details section of the Details tab, Click on Condition tab and specify
following information:
i. Always run this step: Select this option if this approval step is always required.
(Select this option for our example)
ii. Run this step only when the following condition is met: Use this option to
specify the condition on which the step is required
Click Add condition.
Enter conditions on which the step is required.
To verify that the conditions you entered are set correctly, click Test condition.
The form should look as shown below

Microsoft Dynamics AX 2009 Page | 33


c. In the Step details section of the Details tab, Click on Assignment tab and specify
following information:
i. Click on Choose button.
ii. Select the option as “Role based” and specify the values as “Purchase
Requisition Complete Role”.
iii. If you assigned this approval step to multiple users, select one of the following
options:
Single approver: If you select this option, the action applied to the
document is determined by the first person who responds.
Majority of approvers: If you select this option, the action applied to
the document is determined when a majority of approvers respond.
Percentage of approvers: If you select this option, the action applied to
the document is determined when a specific percentage of the
approvers respond.
All approvers: If you select this option, all of the approvers must
approve the document in order for the workflow to continue.

Microsoft Dynamics AX 2009 Page | 34


d. Specify any escalation policy if required in the Escalation tab.

6. Close the form to save the changes

7. Now on the Workflow configuration form, select General tab and click on button Set as active.

8. Now click on Overview tab and click on button Set as default.

9. Save and close the form.

Microsoft Dynamics AX 2009 Page | 35


3.2 Test the Configured Workflow
In this section let us test the configuration that we have created. Before starting the test, let us start the
workflow processor (Tutorial_WorkProcessor form). This processor should be started and kept in the
separate client.

Note: Run this processor only for testing purpose. In live environment one should start the batch job that
was created while configuring the workflow infrastructure through the wizard.

To start the workflow processor, do the following:

1. Traverse to AOT  Forms  Tutorial_WorkFlowProcessor and open the form.


2. Click on Start button to start the processor.

Microsoft Dynamics AX 2009 Page | 36


Follow the steps below to test the workflow configuration that we created.

1. Traverse to form Accounts Payable  Common Forms  Purchase Requisition Details.


2. Press Ctrl + N to create a new requisition and Name it as “My Purch Req1”. Click on OK to create
the header.

3. In the lines press Ctrl + N and select an item say “9001”. Put the quantity as 10 and verify that
the Net amount is not zero and less than 1000 USD.
4. Press Ctrl + S. This will save the record and refresh the form. Now you can see the Purchase
requisition workflow message bar and action buttons on the top of the form.

5. Click on Submit. A dialog for entering the comment appears.


6. Enter some value say “For testing1”

Microsoft Dynamics AX 2009 Page | 37


7. Click on Submit in the child form to close it and submit the record to workflow.

8. Notice the workflow processor. It will indicate that there is 1 record in the queue and is
currently being processed. It will be like that for about 30 seconds and then reset back to zero.

Microsoft Dynamics AX 2009 Page | 38


9. After some time you see a message appearing with information of purchase order created.

10. You can refresh the purchase requisition record and see that the status has changed to
“Approved – Ordered”.
11. You can also see that a notification is received regarding the same.
12. Click on Actions button and select View history.
13. You can check the history of the workflow. Check the Tracking details.

Microsoft Dynamics AX 2009 Page | 39


This test was for automatically approve the requisitions whose total amount is less than 1000 USD. Next
we test for the policy wherein we will be raising a Purchase requisition of amount more than 1000 USD.
See the steps below for the same.

1. Traverse to form Accounts Payable  Common Forms  Purchase Requisition Details.


2. Press Ctrl + N to create a new requisition and Name it as “My Purch Req 2”. Click on OK to
create the header.
3. In the lines press Ctrl + N and select an item say “9001”. Put the quantity as 50 and verify that
the Net amount is not zero, more than 1000 USD and less than 50,000 USD (as the purchasing
manager has an approval limit of 50,000 USD).
4. Press Ctrl + S. This will save the record and refresh the form. Now you can see the Purchase
requisition workflow message bar and action buttons on the top of the form.

5. Click on Submit. A dialog for entering the comment appears.


6. Enter some value say “For testing2”
7. Click on Submit in the child form to close it and submit the record to workflow.
8. Notice the workflow processor. It will indicate that there is 1 record in the queue and is
currently being processed. It will be like that for about 30 seconds and then reset back to zero.
9. After some time refresh the purchase requisition record by pressing F5. You notice that the
requisition is in “Pending approval” stage. This means that the requisition is waiting for the
manager of the requisitioner to approve the requisition
10. Now click on button Action and select View history.
11. Check the name of the approver, in this case it is “Nancy Freehafer”.

Microsoft Dynamics AX 2009 Page | 40


12. To approve this requisition, login with the user id of “Nancy Freehafer” and approve.
13. Open the new AX client with logging as user id attached with Employee “Nancy Freehafer”.
14. After you login, notice that there is one unread notification

15. Open the notification to see what has come

Microsoft Dynamics AX 2009 Page | 41


16. Now either traverse from Accounts Payable  Common Forms  Purchase Requisition Details
and filter out requisitions as “Assigned to me” or on the notifications form itself click on Go to
origin.

17. Now click on Actions and you can perform following tasks
a. Approve: Approve the requisition.
b. Reject: Reject the requisition.
c. Request change: Send the requisition back with change suggestion.
d. Delegate: Assign it to somebody else for approval.
e. Select Action  Approve.
f. In the subsequent form enter some comments like “Approved” and click on “Approve”
button to approve the requisition.

18. After a few seconds an infolog appears showing that requisition is approved and a purchase
order is created for the same.

Microsoft Dynamics AX 2009 Page | 42


19. You can refresh the purchase requisition record and see that the status has changed to
“Approved – Ordered”.
20. You can also see that a notification is received regarding the same.

21. Click on Actions button and select View history and check the history of the workflow.

Microsoft Dynamics AX 2009 Page | 43


4. MANAGING WORKFLOWS
The following topics explain how to monitor and manage workflow instances.

4.1 Status and History of Workflow Instances


Use the following steps to view the status and history of a workflow instance.

1. Open the Workflow history form from Basic  Inquiries  Workflow history.
2. To filter the list of workflow instances that are displayed in the form, select a workflow status.

All — All workflow instances are listed.


Pending — Workflow instances that are currently processing are listed.
Completed — Workflow instances that have completed the required processing are
listed.
Canceled — Workflow instances that have been cancelled are listed.
Stopped (Error) — Workflow instances that have stopped because of an error are listed.
Unrecoverable — Workflow instances that have stopped because of an unrecoverable
error are listed.

3. Select a workflow instance. Details about the workflow instance are displayed on the tabs in the
lower part of the form.
Overview tab — This tab displays the status of the workflow instance and indicates
where the submitted document is at in the workflow.
Work items tab — Use this tab to assign a task or approval step to another user.
Tracking details tab — Displays the history of this workflow instance.

Microsoft Dynamics AX 2009 Page | 44


4.2 Cancel a workflow instance
Use the following steps to stop a workflow instance.

1. Open the Workflow history form from Basic  Inquiries  Workflow history.
2. From the Filter by status list, select one of the following statuses.
Pending — Workflow instances that are currently processing are listed.
Stopped (Error) — Workflow instances that have stopped because of an error are listed.
3. Select the workflow instance that you want to stop. Click Cancel.

4.3 Resume a workflow instance


Use the following steps to resume processing of a workflow instance that was stopped because of an
error.

1. Open the Workflow history form from Basic  Inquiries  Workflow history.
2. From the Filter by status list, select Stopped (Error). Workflow instances that were stopped
because of an error are listed in the form.
3. Select the workflow instance that you want to restart. Click Resume.

Microsoft Dynamics AX 2009 Page | 45

You might also like