Skip to main content

Business Process & Workflow

The Workflow framework in Dynamics 365 Finance & Operations provides a configurable, event-driven engine for automating business processes that require human approvals, task assignments, and automated processing steps. Workflow enables organisations to enforce business rules, route documents for approval, trigger automated actions, and track the lifecycle of business documents through defined process steps.

A workflow defines the sequence of steps a business document must pass through — from submission to final approval or completion. At each step, the framework can assign work items to users, execute automated code, evaluate conditions, and branch the process based on business logic.


How Workflows Are Used

Workflows are used extensively across D365 F&O modules to automate processes such as:

  • Purchase requisition approval — route purchase requests through departmental and financial approval chains.
  • Vendor invoice approval — validate and approve vendor invoices before posting.
  • Expense report approval — review and approve employee expense claims.
  • Free text invoice approval — approve free text invoices before they are posted.
  • Budget approval — route budget revisions through organisational hierarchies.
  • Sales agreement approval — approve sales agreements and blanket orders.
  • Journal approval — approve general ledger journals, fixed asset journals, and inventory journals.

Standard Workflow Examples

The following are common out-of-the-box workflow types in D365 F&O:

ModuleWorkflow TypeDescription
ProcurementPurchReqReviewPurchase requisition review and approval
ProcurementPurchOrderWorkflowPurchase order approval
Accounts PayableVendInvoiceWorkflowVendor invoice approval
Expense ManagementTrvExpWorkflowExpense report approval
General LedgerLedgerJournalWorkflowGeneral journal approval
Accounts ReceivableFreeTextInvoiceWorkflowFree text invoice approval
BudgetingBudgetPlanWorkflowBudget plan review and approval
Human ResourcesHcmLeaveReqWorkflowLeave request approval

Architecture Overview

Workflow Framework Architecture — event-driven document routing and approval engine

The workflow framework is built from several interconnected AOT object types:

AOT ObjectPurpose
Workflow TypesDefine the overall structure of a workflow — which document it applies to, what elements (approvals, tasks) it supports, and event handlers for lifecycle events.
Workflow ApprovalsDefine approval steps where assigned users approve, reject, request changes to, or deny a document.
Workflow TasksDefine manual task steps where assigned users complete work and mark it done.
Workflow Automated TasksDefine automated steps that execute code without human intervention.
Workflow CategoriesGroup workflow types by functional module (e.g., Procurement, Accounts Payable).
ProvidersSupply participant resolution, hierarchy assignment, queue routing, and due date calculation logic.

Workflow Document

Every workflow type is associated with a workflow document — an X++ class that implements WorkflowDocument. This class defines the query that retrieves the data for the document being processed and exposes calculated fields and conditions that the workflow editor can use for routing decisions.

Event Handlers

Workflow objects fire events at key lifecycle points. Developers implement event handler classes to respond to started, completed, and canceled events.

Submitting a Document to Workflow

Documents are submitted to workflow programmatically using the Workflow::activateFromWorkflowType method, typically called from a menu item action.