Back to: Configure and customize Microsoft Dynamics CRM

Table of Contents

Overview

Workflows, a type of Process in Microsoft Dynamics CRM 2011, are described by The Microsoft Dynamics CRM 2011 SDK as: 

A business process can be of two types: automated processes that rely solely on communication among applications based on a set of rules, and interactive processes that also rely on people to initiate and run the process, and to make the appropriate decisions during the running of the process.

Think of automated processes like "triggers" that can create and update records, send out notifications by way of email or task, or call child workflows. On Demand workflows can be thought of as "macros", or more accurately as automated processes that are initiated through an initial user interaction. Fully interactive processes are called Dialogs and are not discussed in this article.

See The Microsoft Dynamics CRM 2011 SDK for more information.

Creating a New Workflow Process


In order to manage Workflows navigate to Settings -> Processes. This presents a list of existing Workflows and Dialogs that you can work with as well as the option to create new records.  When creating a new workflow you will need to assign a name by which to reference it, choose the entity type that it will be associated with, and then select Workflow as the Category. Additionally you can choose to create a New blank process or a New process from an existing template

After beginning a new workflow you will be presented with a number of options before adding any steps to provide automation. The Activate As option gives you the choice of creating a stand-alone workflow when you select Process. Selecting Process template allows you to save the record as a template which can later be re-used to save time when creating future workflows. The selections under Available to Run are As an on-demand process which allows the workflow to be run manually or As a child process which allows the workflow to be run from within another workflow. Both options can be selected if they meet your requirements. Under Options for Automatic Processes, the Scope allows you to determine which records can be affected by the workflow. The choice here operates in conjunction with the user’s normal security permissions and allows another method by which to filter records that can be affected. Lastly the Start when options determine what events causes the workflow to start running. 
Once again, multiple Start when options can be selected to meet your requirements. 

Adding Steps to the Workflow


Making selections from the Add Step menu are what allow you to add the actual automation to your workflow. 

As each step is added a step description line is added to allow users to enter some brief notes defining the functionality of the step. 

Changing the Insert menu from After Step to Before Step dictates if a new step will be placed before or after the currently selected step.

Using Delete this step will remove the current step and all child steps from the workflow.

Administration and Notes


On the Administration tab you will you be able to change the Owner of the workflow to another User. There is a message indicating that when a workflow is reassigned that it must be activated before it can be used again. From this tab, in order to change the Owner the record must already be deactivated, however from the main record grid Workflows and Dialogs can be reassigned while they are still active – requiring them to be reactivated. A large Description field is also present to document any additional information regarding the workflow. Under Workflow Job Retention there is a single option, Automatically delete completed workflow jobs (to save disk space). When this is selected, a workflow job that completes successfully will immediately be removed from the workflow logs to reduce the amount of records stored. In an environment like CRM Online this option can help reduce the database size so you are less likely to hit your storage quota. When working with particularly complex workflows, this option should be disabled during testing and in the event you may suspect the workflow is not functioning correctly so you can have the benefit of reviewing the available logs. A standard Notes tab is also available to include additional time stamped detail that can include file attachments.

Auditing can be enabled for Workflows and Dialogs under the Process entity but details regarding the Steps are omitted. Only the header information and status changes are recorded.

Activating the Workflow


Once all steps have been added and changes have been saved you will see the workflow in a Draft Status. In order for the workflow to begin working, you must select a record and use the Activate button. A workflow can only be activated if all steps have been completed. An example of an incomplete step would be adding a Create Record step but not defining the entity type and setting any required fields. If successful, the workflow will now be in an Activated Status. At which point changes to the workflow will not be allowed until the selected workflow is deactivated using the Deactivate button.