This documentation is archived and is not being maintained.

Workflow Architecture

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

The workflow management system is a part of the Microsoft Dynamics CRM extensibility story that includes the Microsoft Dynamics CRM SDK, plug-ins, forms, and other components.

The following diagram illustrates the high-level system architecture for Microsoft Dynamics CRM and highlights parts of the system that are specific to workflow.

Workflow Architecture

The previous diagram shows the workflow architecture of Microsoft Dynamics CRM including the internal components, the external components, the infrastructure, and the data.

The internal Microsoft Dynamics CRM components that support the Microsoft Dynamics CRM workflow programming model include Web services, shared platform, and business logic.

The shared platform consists of common Microsoft Dynamics CRM components that provide registry, metadata cache, and data access services. Business logic contains the implementation of business logic for Microsoft Dynamics CRM business entities.

The external components are as follows:

  • Windows Workflow Foundation object model, which contains a set of classes used to create and parse workflow definitions in XAML format.
  • Windows Workflow Foundation execution, which contains a set of classes used to execute workflows.

The Microsoft Dynamics CRM Workflow infrastructure consists of the following components:

  • Workflow Object Model, which contains a set of classes that use the Windows Workflow Foundation object model and expose Microsoft Dynamics CRM workflow activities.
  • Workflow business logic, which implements business logic for workflow-specific entities.
  • Workflow Execution, which provides workflow execution services such as workflow hosting and persistence.

The Microsoft Dynamics CRM workflow programming model is supported by the following data:

  • Business data, which contains information associated with Microsoft Dynamics CRM entities.
  • Workflow configuration data, which includes workflow definitions, compiled workflows, and workflow settings.
  • Workflow runtime data, which is required to execute workflows and implement such workflow features as persistence and notifications.

Workflow and the Asynchronous Service

The asynchronous service enables you to execute, monitor, and manage various long-running operations, such as bulk import, bulk mail, and workflows. To improve performance, scalability, and reliability of Microsoft Dynamics CRM, these operations are run asynchronously. This means that a requested operation is not processed instantly, but added to a queue and processed by the system at an appropriate time.

When an event is raised in the Microsoft Dynamics CRM platform pipeline, all workflows that are associated with the event are executed by the asynchronous service. The workflow event handlers are added to the asynchronous queue and processed according to the event execution order.

Workflow and the Unified Event Model

With Microsoft Dynamics CRM 3.0, you can add custom code before or after the execution of the core platform operations by using pre-callouts and post-callouts. However, callouts do not support specifying the execution order or dependencies on other events. Microsoft Dynamics CRM 4.0 introduces a unified event model that is used in both plug-ins (callouts) and in workflow. This event processing subsystem adds more flexibility to the execution of workflows and plug-ins by introducing the pipeline execution model.

Using this model, workflows and plug-ins are executed based on their registration, message type and a predefined set of configurable parameters. The core platform operations take part in the execution sequence to form a much more reliable and extensible execution model.

See Also


Other Resources

© 2010 Microsoft Corporation. All rights reserved.