Share via


Workflow for Microsoft Dynamics AX

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Microsoft Dynamics AX provides workflow functionality that you can use to ensure that documents are processed and approved in a consistent and efficient manner. This article introduces you to the workflow system in Microsoft Dynamics AX and guides you through the process of configuring, extending, and using it.

Lifecycle

Get started

Configure

Extend

Use

Troubleshoot

View technical reference

Get started

A workflow represents a business process. A workflow defines how a business document flows through the system by indicating who must process and approve it. Complete the following tasks to become familiar with the workflow system in Microsoft Dynamics AX.

Task

Details

For more information

Learn about new features

Many new features have been added to the workflow functionality in Microsoft Dynamics AX 2012. For example:

  • Workflow server components no longer have to be installed on a web server that is running Internet Information Services (IIS). Workflow server components are now automatically installed when you install the Application Object Server (AOS) for Microsoft Dynamics AX.

  • A workflow editor is now available. The workflow editor is a graphical user interface that you can use to create Microsoft Dynamics AX workflows by arranging workflow elements on a design surface. The process is similar to graphically modeling a business process by using Microsoft Visio.

See the associated article to view the full list of new features.

What's new: Workflow features

Understand key concepts about the workflow system

The term workflow can be defined in two ways: as a system and as a business process.

  • Workflow is a system – Workflow is a system that is installed with Microsoft Dynamics AX and that runs on the AOS. The workflow system provides functionality that you can use to create individual workflows, or business processes.

  • Workflow is a business process – A workflow represents a business process. It defines how a document flows, or moves, through the system by showing who must complete a task, make a decision, or approve a document.

These articles explain key concepts and terms that you must understand to configure and use the workflow system.

Overview of the workflow system

Workflow system architecture

Workflow elements

Workflow participants

Workflow types

Workflow actions

About the workflow editor

See workflow examples

You can design and structure a workflow in many ways. These articles provide examples of workflows and explain how documents move through each workflow.

Workflow with users

Workflow with roles

Workflow with multiple users in a task

Workflow with multiple users in an approval step

Workflow with a manual decision

Workflow with a conditional decision

Workflow with a line-item workflow element

Configure

The following sections will help you configure the workflow system, create individual workflows, and configure the elements within a workflow.

Configure the workflow system

Complete the following tasks to enable workflow functionality in Microsoft Dynamics AX.

Task

Details

For more information

Specify the workflow execution account

Select a domain account to serve as the workflow execution account. The workflow execution account runs business logic for the application and accesses Microsoft Dynamics AX data.

Specify the workflow execution account

Select number sequences

An identification number is automatically assigned to every workflow that is created and every instance of a workflow that is generated. The identification numbers are based on number sequences. This article provides information that will help you create number sequences. It also describes how to specify which number sequence is used to generate IDs for workflows, and which number sequence is used to generate IDs for workflow instances.

Select number sequences for the workflow system

Configure workflow batch jobs

The workflow system uses batch jobs to process messages, determine due dates for work items, and process notifications for line items. See these articles for step-by-step instructions that explain how to create a batch group and configure batch jobs.

Create a batch group for the workflow system

Run the Workflow infrastructure configuration wizard

Set up users for the workflow system

To make sure that Microsoft Dynamics AX users can participate in workflow processes, you must complete the following tasks:

  • Assign users to roles – Assign users to roles in Microsoft Dynamics AX. For more information, see Assign users to security roles.

  • Assign users to employee IDs – Assign each user to an employee ID by specifying user relations. For information about user relations, see Configure user relations.

Configure email settings

You can configure Microsoft Dynamics AX to send email messages to users when workflow-related events occur. For example, email messages can be sent to users when documents are assigned to them for approval. See the associated article to configure email settings for the workflow system.

Configure email settings for the workflow system

Configure work item queues

A manual task can be assigned to a work item queue, which is a collection of documents that require processing. Every work item queue must have users assigned to it who are responsible for monitoring the queue and processing the documents that are in it.

Create a work item queue

Create a work item queue group

View the work items in the queues that you administer

Configure workflows

Complete the following tasks to create and configure business processes, or workflows, in the workflow editor.

Task

Details

For more information

Create a workflow

Creating a workflow involves opening the workflow editor, dragging the workflow elements you want to use onto the canvas, and configuring properties. The associated article will walk you through this process.

Create a workflow

Configure the properties of a workflow

To configure the properties of a workflow, open the workflow in the workflow editor. Click the canvas of the workflow editor and then click Properties to open the Properties form. You’ll need to enter a name for the workflow, specify when the workflow should be used, and specify when notifications regarding this workflow should be sent to users.

Configure the properties of a workflow

Specify default workflows

You can create multiple workflows of the same type. For example, you can have the following purchase requisition workflows:

  • Purchase Requisitions Denmark – This workflow is used when country/region = DK.

  • Purchase Requisitions Spain – This workflow is used when country/region = ES.

When you have multiple workflows of the same type, you must specify which workflow is the default workflow. Documents that do not meet any of the activation conditions are processed by the default workflow.

Indicate that a workflow is the default workflow

Configure the elements of a workflow

A workflow consists of elements, such as a task or an approval process. The information in the following table will help you learn more about the elements and configure them.

Task

Details

For more information

Learn about the workflow elements

A workflow may consist of several types of elements. For example, a workflow may consist of a manual task, an approval, and a conditional decision. This article describes each type of element and explains why you’d want to use each element.

Workflow elements

Configure an element

These articles explain how to configure the properties of each workflow element.

Configure a manual task

Configure an automated task

Configure an approval process

Configure a manual decision

Configure a conditional decision

Configure a parallel activity

Configure a subworkflow

Configure a line-item workflow

Extend

Complete the tasks in the following table to add workflow functionality to a module in Microsoft Dynamics AX.

Task

Details

For more information

Learn about the development process

Workflow is defined as the movement of documents or tasks through a work process. In Microsoft Dynamics AX, the focus of workflow is on approval and task-oriented workflows. The developer role in Microsoft Dynamics AX is primarily to add workflow to existing business documents or create new documents that support workflow. These topics describes what the workflow life cycle is and the developer role for a workflow in Microsoft Dynamics AX.

About Workflow Development

Developing a Workflow

Review security considerations

Security in workflow is part of the standard security implementation in Microsoft Dynamics AX. This topic describes specific workflow security considerations.

Workflow Security

Create a workflow type

To add workflow support for a document in Microsoft Dynamics AX, you must create a workflow type. This section describes the procedures to create a workflow type in Microsoft Dynamics AX. The workflow type can then be used to create workflow configurations for the document the Microsoft Dynamics AX.

Workflow Type Checklist

How to: Create a Workflow Category

How to: Create a Query for a Workflow Type

How to: Create a New Workflow Type

How to: Create a Workflow Document Class

How to: Create a SubmitToWorkflow Class

How to: Associate a Workflow Document Class with a Workflow Type

Walkthrough: Creating a Workflow Type

Enable workflow functionality in a module

To enable a Microsoft Dynamics AX workflow for a new or existing application module, you must complete a series of required steps and then, depending on application requirements, complete additional steps. This topic describes the required steps to add workflow to your application.

Requirements for Enabling Workflow in an Application Module

How to: Enable a State Model for a Workflow Document

How to: Enable Workflow Submission

How to: Enable a Form or List for Workflow

How to: Create a New Module with Workflow

How to: Activate a Workflow from a Workflow Type

How to: Activate a Workflow using the Configuration ID

How to: Activate a Workflow using the Sequence Number

Create tasks, automated tasks, and approvals

After you create a workflow type, you continue the process for creating a Microsoft Dynamics AX workflow by adding tasks, automated tasks, and approvals to the workflow type. A task is a workflow element with a single step defined in the Application Object Tree (AOT) that is used to implement task-based processes. An automated task is a workflow element used to invoke X++ code within the application without requiring user intervention. An approval is a specialized task that can have multiple steps defined in the AOT that is used to implement approval processes.

You create tasks, automated tasks, and approvals in separate AOT nodes and then, you can add them to the workflow type Supported Elements node. The same tasks and approvals can also be added to different workflow types.

Workflow Tasks

Workflow Automated Tasks

Workflow Approvals

How to: Associate an Action Menu Item with a Workflow Task or Approval Outcome

How to: Associate a Display Menu item with a Workflow Task or Approval

How to: Add a Task, Automated Task, or Approval to a Workflow Type

Implement workflow events

Microsoft Dynamics AX workflow uses events to initiate business logic in your application. For example, the workflow type has a property event handler for business logic when a workflow is started. Workflow tasks and approvals have started and canceled property event handlers and also an event handler for each outcome type. This section describes workflow events and how to implement them in your application.

Workflow Events Overview

How to: Create a Workflow Event Handler

How to: Create a Workflow Task or Approval Event Handler

Create line-item workflows

Microsoft Dynamics AX lets you configure workflows for the line items in a document. For example, you can have a workflow for the line items in the purchase requisition document. The line items can use the same workflow, or they can each use a separate workflow. The following topics describe how to create a line-item workflow.

Line-item Workflow Checklist

How to: Create a Line-item Workflow

Create a custom workflow provider

Workflow providers in Microsoft Dynamics AX provide application-specific data for a workflow at runtime. The application data provided can include the following:

  1. User IDs based on user groups.

  2. Due dates based on employee or manager working days.

  3. Specific user or manager IDs based on their maximum approval limits.

  4. A queue to which a work item is to be assigned.

The following topics describe the workflow providers in Microsoft Dynamics AX, the programming interface for each provider, and how to create a customized version of a provider.

Workflow Providers Overview

Workflow Provider Interfaces

How to: Create a Custom Workflow Provider

Use

The information in the following table will help users in your organization complete workflow-related tasks, such as submitting documents for approval, or reviewing the status of a document that was submitted for approval.

Task

Details

For more information

Configure the workflow notification options

Notifications may be sent to you when workflow-related events occur. For example, a notification may be sent to you when a document is assigned to you for approval or when the workflow process is completed for a document that you submitted. You can specify how you want to receive workflow notifications.

Configure the workflow notification options

Submit a document for approval

To submit a document to the workflow system for processing, click the Submit button in the form that you are working in. For example, to submit a purchase requisition, click the Submit button in the Purchase requisitions form.

Submit a document

View the status and history of a document that you submitted

To view the status and history of a document that you submitted for processing, use the Workflow history form. Click Home > Inquiries > Workflow > Workflow history.

View the status and history of a document that you submitted

Recall a document from the workflow process

To stop the workflow system from processing a document that was submitted, you must recall the document.

Recall a document from the workflow process

Respond to work items

Work items are workflow-related tasks that are assigned to you. For example, you may have to approve a document, make a decision about a document, or complete a task that is associated with a document. These articles explain how to respond to the work items that are assigned to you.

View your work items in a workflow

Act on a task

Review a document assigned to you for approval

Complete a workflow decision

Delegate work items in a workflow

Troubleshoot

The following table points to troubleshooting resources.

Task

Details

For more information

Troubleshoot common problems

This topic describes common problems that can occur when you develop and test a workflow in Microsoft Dynamics AX.

Troubleshooting Workflow in Microsoft Dynamics AX

How to: Debug X++ Code in Workflow

View technical reference

Microsoft SQL Server Reporting Services (SSRS) reports and a Microsoft SQL Server Analysis Services (SSAS) cube are available to help you monitor and manage workflows. Technical reference content is available that provides details about these reports and the cube.

Task

Details

For more information

View technical content about workflow reports (SSRS)

Microsoft Dynamics AX includes reports that can help you track the history and current status of business processes in your organization.

Workflow automation report (WorkflowAutomationReport)

Workflow elements automation report (WorkflowElementsAutomationReport)

Workflow elements performance report (WorkflowElementsPerformanceReport)

Workflow instance by status report (WorkflowInstanceByStatusReport)

Workflow participants performance report (WorkflowParticipantPerformanceReport)

Workflow performance report (WorkflowPerformanceReport)

Workflow tracking report (WorkflowTrackingReport)

View technical content about the workflow cube (SSAS)

The workflow cube provides data that can help you track the performance and degree of automation associated with business processes in your organization, which will enable you to identify processes that have become inefficient.

Workflow cube (WorkflowCube) for Microsoft Dynamics AX 2012 R2

Workflow cube (WorkflowCube) for Microsoft Dynamics AX 2012 and Microsoft Dynamics AX 2012 Feature Pack