Ax2012 Enus WN Dev 08

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

Chapter 8: Workflow

CHAPTER 8: WORKFLOW
Objectives
The objectives are:

Explain the improvements made to Microsoft Dynamics AX 2012


Workflow.

Discuss the new graphical Workflow editor used to design business


processes.

Discuss how to implement a line-item workflow.

Introduction
The workflow architecture in Microsoft Dynamics AX 2012 is now refined and
simplified. Workflow is incorporated into the Application Object Server (AOS)
and upgraded to .NET 4.0. The workflow authoring experience is now improved
to include a graphical workflow editor, and system wide changes are now
incorporated including changes to the organization model, security, financial
dimensions, and the relational database.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-1

What's New - Technical in Microsoft Dynamics AX 2012 for Development

Overview
With the overall Microsoft Dynamics AX 2012 theme of simplified user and
development experience, there have been multiple improvements to workflow,
including the changes in functionality and configuration described in the
following table.
Microsoft Dynamics AX
2009

Forward only, sequential


workflows

Only interactive elements


(tasks and approvals)

Support for subworkflows

Separate workflow
component have to be
installed

Requires IIS and .NET


Business Connector

8-2

Business user configures


workflows using a
Microsoft Dynamics AX
client form

Requires additional
security setup

Microsoft
Dynamics AX
2012
Introduce
branching

Introduce
automated
tasks

Introduce lineitem workflow


support

Introduce
parallelism

Introduce a
graphical
workflow
editor

Support for
drag-anddrop of
workflow
elements

Familiar
property
editing
experience

Host the .NET


Workflow
runtime in
AOS

Separate
installation no
longer required

Benefits

Expand workflow
capabilities by
providing broader
applicability

Improve the
workflow editing
experience and
usability

Simplify workflow
deployment and
installation

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow
Architectural Changes
Workflow server components no longer need to be installed on a web server
running Internet Information Services (IIS). Workflow server components are
now automatically installed when installing the Microsoft Dynamics AX AOS.
This new deployment significantly simplifies the administrative effort required to
set up the workflow infrastructure.

Workflow History
You can view workflow history and the status of an active or completed
workflow and its elements that includes data about new workflow features, such
as advanced flow-controls, automated tasks, line item workflow, and work item
queues. You can view this data either in the Microsoft Dynamics AX client or the
Enterprise Portal for Microsoft Dynamics AX.

Workflow Performance Analysis Reports


Microsoft Dynamics AX 2012 includes a new workflow online analytical
processing (OLAP) cube, and performance analysis reports built on this cube.
These tools can help determine whether a workflow is adding efficiency to your
business processes, and provide a means of comparing an automated workflow to
the manual processes it replaced. The new performance analysis reports focus on
showing how much work was done by using the workflow and how much time
that it took to perform the business tasks that comprise the workflow. Using these
reports can help you modify your workflows and optimize their performance.
These reports include the following:

Workflow Performance Report: Provides overall performance


numbers for workflow instances

Workflow Elements Performance Report: Provides performance


numbers broken down by workflow element for a particular
workflow

Workflow Participants Performance Report: Provides participant


specific performance numbers for a selected workflow

Workflow Automation Report: Provides a breakdown of manually


versus automatically completed elements

Workflow Elements Automation Report: Provides a breakdown of


manually versus automatically completed elements for a particular
element

Upgrade Information
Workflows being processed in Microsoft Dynamics AX 2009 will not be
upgraded. Before you upgrade to Microsoft Dynamics AX 2012, the
recommendation is to process all documents that are submitted to workflow, or
cancel the workflows that are currently in progress.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-3

What's New - Technical in Microsoft Dynamics AX 2012 for Development

Workflow Editor
The Workflow Editor is a graphical interface that is used to model Microsoft
Dynamics AX 2012 workflows by arranging workflow elements similarly to how
a business process is graphically modeled using Microsoft Visio. You can add,
delete, and reposition workflow elements that represent the tasks and approvals
that comprise the workflow. You can also add flow-control elements, such as
manual and automated decisions, automated tasks, parallel activities, and subworkflows. These improvements can be used to create complex workflows that
closely model the business processes that an organization wants to automate.
For each element in a workflow, you set properties that determine things such as
the assignment of a task, the time allowed for completing a task, an escalation
path in case the time limit for the task is exceeded, who will be notified about
specific events related to the task, and any automatic actions that will be taken
for the task.
The Workflow Editor uses the workflow designer in .NET 4.0 and replaces the
forms-based workflow configuration that is used in the Microsoft Dynamics AX
2009 client.

Flow-Control Elements
Several new elements were added to help you design workflows. These elements
will help create workflows that have alternate branches or branches that run at
the same time. These elements include the following:

8-4

Conditional decision: A point at which a workflow divides into two


branches. The system will decide which branch to use by evaluating
the submitted document to determine whether it meets a specified
condition.

Manual decision: A point at which a workflow divides into two


branches. A user must take an action, and the action taken will
determine which branch is used to process the submitted document.

Parallel activity: A workflow element that includes two or more


branches that run at the same time.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow
Advanced Workflow Controls
Workflow for Microsoft Dynamics AX 2012 now supports advanced workflow
flow controls. They include starting and ending elements, manual and conditional
decisions, parallel activity and parallel branches, automated tasks, and sequence
flows. Business users can now author workflows that correspond more closely to
real life business processes using graphical elements that help them to better
visualize the process flow. The following table describes the new workflow
control elements that provide additional flow control capabilities to increase the
automation of a workflow.
Workflow
element

Description

Start

Represents the starting point in a workflow. This workflow


element is used at the start of a workflow, or at intermediate
start points in a workflow, such as in a parallel workflow.

Parallel branch

Represents a workflow concept for parallel activities in a


workflow. A parallel workflow can split a workflow
sequence into two or more parallel workflows that execute
separately and then join before continuing to the next
workflow element.

End

Represents the termination point in a workflow. This


workflow element is used at the end of a workflow, or at
intermediate endpoints in a workflow, such as in a parallel
workflow.

Automated
Tasks

An automated task is a workflow task that executes business


logic and requires no human interaction. For example, an
automated task can perform a credit check, run a report, or
update a record.

NOTE: The advanced controls are not defined in the Application Object Tree
(AOT).

Automated Task
You can now add automated tasks to your workflows. An automated task is a
type of workflow element that does not involve human interaction. For example,
an automated task can perform a credit check, run a report, or update a record.
The purpose of an automated task is to execute business logic as part of a
workflow that is implemented to automate a business process.

Scenario: Review a Workflow


Prakash, the Project Manager, wants to review the Dispute Workflow. He wants
to use the workflow editor to review the properties for each element in the
workflow.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-5

What's New - Technical in Microsoft Dynamics AX 2012 for Development


Procedure: Review a Workflow
To review and analyze a workflow, follow these steps:
1. Select Travel and expense > Setup > Travel and expense
workflow to open the new Workflow list page.
2. Enter Dispute workflow into the filter field and change the filter
type to Name. Click the Arrow.
3. Click Edit to start the Workflow Editor.
4. Right-click the Conditional Decision 1 node on the canvas and then
click Properties.
5. Review the Properties and close the Properties form.
6. Right-click the Accept or reject dispute 2 task and then click
Properties.
7. Review the properties such as Required, Assign to, Automatic
Action, Notification, and Advanced.

8-6

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow
8. Remove the Accept or rejected escalate comment from the Work
item subject field.
9. Close the Properties form.
10. Open the Error Pane by clicking the Show error pane button (error
is caused by step 10).

FIGURE 8.1 WORKFLOW EDITOR

11. Double click the error to open the Property editor.


12. Enter "Accept or rejected escalate" into the Work item subject
field.
13. Verify no more errors occur in the Error pane.
14. Optionally, review the support for manual decision, parallel activity,
and sub workflow.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-7

What's New - Technical in Microsoft Dynamics AX 2012 for Development


Work Item Queue
In Microsoft Dynamics AX 2009, you could assign a workflow task to a user,
role, or organizational hierarchy. In Microsoft Dynamics AX 2012, you can now
also assign a workflow task to a work item queue. A work item queue is a list of
workflow tasks that must be completed.
You can determine which users to assign to a queue. Any user assigned to a
queue can complete any of the tasks in the queue.

Scenario: Setup Work Item Queue


Inga, the Purchasing Manager, wants to set up a work item queue that will
contain tasks for non-catalog requisitions submitted. Her company is facing
significant increase in the employee purchases that are not completed through
catalogs and are not compliant with corporate purchasing policies. Ingas team is
responsible for realizing better cost savings and enforces compliance with
corporate quality standards.
Inga needs to create a work item queue and a new workflow.

Procedure: Setup Work Item Queue


1. Select Organizational administration > Setup > Workflow >
Work item queues to open the Work item queue setup form.
2. Click New and enter a name into the Name field.
3. Select Purchase requisition as the Document type and add more
users.
4. Set the Status of the queue to Active.
5. Open Procurement and sourcing > Setup > Procurement and
sourcing workflows.
6. Select the Automatic purchase requisition approval workflow.
7. Click Edit to update the workflow.
8. Right-click the Purchase requisition review 1 task and select
Properties.
9. Click Assign-to and select Queue as the user role.
10. Click the Queue based tab and select Workflow work item
provider.
11. Select the Queue token name.
12. Click Save and Close to close the Workflow editor.
13. Enter a Version note and click OK.
14. Activate the new version and then click OK.

8-8

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow

Lab 8.1 - Create a Work Item Queue


This lab demonstrates how to create a work item queue, open the workflow
editor, and how to modify a workflow to use the work item queue.
Scenario
Inga, the Purchasing Manager, wants to set up a work item queue that will
contain tasks for non-catalog requisitions submitted. Her company is facing a
significant increase in the employee purchases that are not done through catalogs
and are not compliant with corporate purchasing policies. Ingas team is
responsible for realizing better cost savings and enforces compliance with
corporate quality standards.
Inga has privileges to create, update queues and to take workflow actions on
requisitions and also to view, update and create requisitions in user-defined legal
entities.
Alicia and Lisa are valid Microsoft Dynamics AX users who are authorized to
take workflow actions on requisitions and can view, and update requisitions.

Challenge Yourself!
Use the information that is provided to create a work item queue and modify the
Automatic purchase requisition approval workflow to use the new work item
queue.

Need a Little Help?


1. Create a new work item queue of type Requisition.
2. Select the Automatic purchase requisition approval workflow.
3. Modify the Assign-to property to use the work item queue created in
step 1.
4. Test your solution.

Step by Step
1. Select Organizational administration > Setup > Workflow >
Work item queues to open the Work item queue set up form.
2. Click New and enter Requisition review queue into the Name field.
3. Select Purchase requisition as the Document type.
4. Expand the User Fast Tab.
5. Click the Add button to add more users to the Requisition review
queue.
6. Set the status of the queue to Active.
7. Close the Work item queue form.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-9

What's New - Technical in Microsoft Dynamics AX 2012 for Development


8. Open Procurement and sourcing > Setup > Procurement and
sourcing workflows.
9. Select the Automatic purchase requisition approval workflow.
10. Click Edit to update the workflow.
11. Right-click the Purchase requisition review 1 task and select
Properties.
12. Click Assign-to and select Queue as the user role for this workflow.
13. Click the Queue based tab and select Workflow work item queue
provider.
14. Select Requisition review queue as the Queue token name.
15. Click Save and Close to close the Workflow editor.
16. Enter a Version note and click OK.
17. Activate the new version and then click OK.
18. Open the Purchase requisition form from the Procurement and
sourcing > Common > Purchase requisitions > All purchase
requisitions menu item.
19. Select PR-000006 and click Edit.
20. Select the line and click Details to edit the line.
21. Expand the General fast tab and ender General into the reason code
field.
22. Submit the workflow.
23. Open the Work item queue form for purchasing by clicking the
Procurement and sourcing > Purchase requisitions > Purchase
requisitions assigned to my queues menu item.
24. Review the Work item queue.

8-10

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow

Line-Item Workflows
You can now implement workflows for line items on a document. By providing
support for line-item workflows, workflow now supports more business process
scenarios. For example, you might define a workflow for timesheets where each
line item on the timesheet is approved by a specific project manager.
A line-item workflow is configured and instantiated for different types of line
item records that are related to a header. A header-line workflow can be
configured to pause until other workflows are run on any number of line records.
For example, a header can be a sales order with sales order lines or a purchase
order with purchase order lines. Each line item associated with the header has its
own workflow processing, depending on the conditions set up for that workflow.
After each individual line items workflow processing is completed, the overall
workflow can continue.

Line-Item Workflow in the AOT


A developer can enable line-item workflows for a workflow type inside the AOT
so that business users can author a workflow in the Workflow Editor that
includes line-item workflows.

FIGURE 8.2 PURCHREQREVIEW LINE ITEM WORKFLOW

Scenario: Create a Line-Item Workflow


Prakash, the Project Manager, wants to enforce the business rule in Contoso that
expense reports can only be approved as a whole when all the expense lines are
approved. Lines need to be approved by the respective project manager.
Contosos previous system only enabled expense sheets to be approved at the
header level, across all expense sheet lines.

Procedure: Create a Line-Item Workflow


To set up a line-item workflow, follow these steps:
1. Open Travel and Expense > Setup > Workflows.
2. Click New and create a new workflow by using the Travel and
Expense workflow type.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-11

What's New - Technical in Microsoft Dynamics AX 2012 for Development


3. Drags the Trv line item workflow element onto the canvas.
4. Right-click the TrvLineItemWorkflow 1 task and select
Properties.
5. Select Invoke a single workflow for all lines option.
6. Set the Line item workflow field to Expense line WF - Assign to
Admin.
7. Save the workflow and set its state to Active.

Summary
Workflow in Microsoft Dynamics AX 2012 is refined from its initial release in
Microsoft Dynamics AX 2009. The major improvements include the following:

8-12

Workflow runtime is now hosted in the AOS.

The introduction of the Graphical workflow editor.

Improvements to Workflow control and assignment.

The introduction of Workflow performance analysis reporting.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow

Test Your Knowledge


1. Which of the following improvements are introduced in Microsoft Dynamics
AX 2012 to simplify the user and development experience in workflow?
(Select all that apply)
( ) Host the Workflow Foundation runtime in AOS
( ) Line-item workflow support
( ) Drag-and-Drop of workflow elements
( ) Graphical workflow editor
2. Which system-wide changes were implemented in workflow? (Select all that
apply)
( ) Financial dimensions
( ) Organization model
( ) Security
( ) Relational database changes
3. Match the workflow improvements to their descriptions.
_____ 1. Advanced
flow controls
_____ 2. Line level
workflow
_____ 3. Work item
queue
_____ 4. Automated
tasks
_____ 5. AOS hosting
_____ 6. Graphical
workflow editor

a. New canvas based drag-and-drop interface for


creating workflows.
b. Workflow processes run at the line level
instead of at the header.
c. Group of users which workflow tasks can be
assigned to.
d. New workflow controls to execute business
logic without user interaction.
e. Controls to allow for branching and decisionmaking within workflows
f. Workflow runtime was moved from IIS to the
AOS.

4. What are the advantages of moving workflow from IIS to the AOS? (Select
all that apply)
( ) Simplified setup.
( ) Multi-threading.
( ) Fewer components to break in production
( ) 64 bit support.
5. Which tool would you use to find the status of a specific workflow?
( ) Batch job history
( ) Performance analysis reports
( ) Workflow history

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-13

What's New - Technical in Microsoft Dynamics AX 2012 for Development

Quick Interaction: Lessons Learned


Take a moment and write down three key points you have learned from this
chapter
1.

2.

3.

8-14

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

Chapter 8: Workflow

Solutions
Test Your Knowledge
1. Which of the following improvements are introduced in Microsoft Dynamics
AX 2012 to simplify the user and development experience in workflow?
(Select all that apply)
() Host the Workflow Foundation runtime in AOS
() Line-item workflow support
() Drag-and-Drop of workflow elements
() Graphical workflow editor
2. Which system-wide changes were implemented in workflow? (Select all that
apply)
() Financial dimensions
() Organization model
() Security
() Relational database changes
3. Match the workflow improvements to their descriptions.
e 1. Advanced flow
controls
b 2. Line level
workflow
c 3. Work item
queue
d 4. Automated
tasks
f 5. AOS hosting
a 6. Graphical
workflow editor

a. New canvas based drag-and-drop interface for


creating workflows.
b. Workflow processes run at the line level
instead of at the header.
c. Group of users which workflow tasks can be
assigned to.
d. New workflow controls to execute business
logic without user interaction.
e. Controls to allow for branching and decisionmaking within workflows
f. Workflow runtime was moved from IIS to the
AOS.

4. What are the advantages of moving workflow from IIS to the AOS? (Select
all that apply)
() Simplified setup.
( ) Multi-threading.
() Fewer components to break in production
( ) 64 bit support.

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

8-15

What's New - Technical in Microsoft Dynamics AX 2012 for Development


5. Which tool would you use to find the status of a specific workflow?
( ) Batch job history
( ) Performance analysis reports
() Workflow history

8-16

Microsoft Official Training Materials for Microsoft Dynamics


Your use of this content is subject to your current services agreement

You might also like