Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Configuring Workflows

.

In the previous step, we learned how to create a workflow and in this step, we will examine configuring workflows. Workflows automate business processes. People usually use workflow processes to initiate automation that doesn’t require any user interaction.

When configuring workflows, you have four major areas to consider:

  • When to start them?
  • Should they run as a real-time workflow or a background workflow?
  • What actions should they perform?
  • Under what conditions should actions be performed?

Depending on the business requirements you can configure a workflow to be started:

  • automatically in response to the events such as create, update, delete, change in record status, or change in record ownership (assignment).
  • manually by a user.
  • as a child workflow that will be started by another workflow process.

To create a new or modify existing workflow, open the chosen unmanaged solution and select Processes. You can view existing workflows in the solution by filtering on processes that have the Category Workflow. If an existing workflow is not in the solution you may need to add it using Add Existing command.

Screenshot of business processes with filter applied for workflows

When you create a workflow using New command, the Create Process dialog requires that you set the following properties that all processes have:

Property Description
Name The name of the workflow process does not need to be unique, however you may want to use a naming convention to clearly differentiate your processes. You may want to apply standard prefixes to the name of the workflow. The prefix may describe the function of the workflow or the department within the company. This will help you group similar items in the list of workflows.
Category Select Workflow to create a workflow process. You can’t change the category once the process is created.
Entity Each workflow process is associated with a single entity. Regardless of the method used to start the workflow, each running instance of a workflow process will have a single target record of the entity associated with the process. You can’t change the entity after the workflow process is created.
Run this workflow in the background (recommended) This option appears when you select workflow as the category. This setting determines whether the workflow is a real-time or background workflow. Real-time workflows run immediately (synchronously) and background workflows run asynchronously. The configuration options available depend on your choice for this setting. Background workflows allow for wait conditions that are not available for real-time workflows. As long as you don’t use those wait conditions, at a later time you can convert background workflows to real-time workflows and real-time workflows to background workflows.
Type Specify whether to build a new workflow from scratch or choose to start from an existing template. When you choose New process from an existing template (select from list) you can choose from the available Workflows processes that were previously saved as a process template for the selected entity.

Screenshot of creation of a new process

After you create the Workflow or if you edit an existing one, you will have the following additional properties grouped into a number of sections. The properties available change depending on whether the workflow is background or real-time.

Property Description
Process Name Process name can be changed when the process is deactivated. While references to workflows from other workflows are not affected, often during implementations projects contain developers’ code that may refer to a process by name. Renaming the process that is in use may require additional coordination across the project to deal with these references.
Activate As You can choose Process template to create an advanced starting point for other workflows. If you choose this option, after you activate the workflow it will not be applied but instead it will be available to select in the Create Process dialog. Process templates are convenient when you have a number of similar workflow processes and want to define them without duplicating the same logic, or when you want to provide users with a starting point for the most common tasks they would like to automate for themselves.

Tip: When editing a workflow, use the Hide Process Properties once you have completed these items. It will give you more working space to build out the remainder of the workflow definition.

Available to Run

This section contains options that describe how the workflow is available to be run.

Property Description
Run this Workflow in the background (recommended) This check box reflects the option you selected when you created the workflow. This option is disabled, but you can change it from the Actions menu by choosing either Convert to a real-time workflow or Convert to a background workflow.
As an on-demand process Choose this option if you want to allow users to run this workflow from the Run Workflow command.
As a child process Choose this option if you want to allow the workflow to be available to be started from another workflow.

Workflow Job Retention

For background workflows this section contains an option to delete information about a workflow run after the workflow execution has completed.

For real-time workflows the logs are not retained by default, but this section contains an option to retain the logs for the jobs that encountered errors.

Options for Automatic Processes

Available options in this section depend on whether the process is background or real-time.

Scope

If the scope is organisation, then the workflow logic can be applied to any record in the organisation. Otherwise, the workflow can only be applied to a subset of records that fall within the scope.

The default scope value is the user. For workflows deployed with solutions that you intend to work on all records modified you would want the scope to configured to organisation and the connection’s user to have organisation level read access to work properly. Make sure you verify that the scope value is appropriate before you activate the workflow.

Workflow scope is discussed in detail in the next lesson.

Start When

Use the options in this section to specify when a workflow should start automatically.

You can configure a real-time workflow to be run before or after certain events. Configuration of a real-time workflow is discussed in detail in the next lesson.

Background workflows always run after the triggering action and may not run immediately. This approach works best for the processing that is not time-sensitive, for example sending an email in response to a certain event.

Be aware that some events and subsequent actions may cause a workflow to call itself. For example, triggering workflow on record status changes event and then changing the record status as part of the workflow will cause the workflow to call itself which may or may not be intentional.

When record fields change event is selected, use select button to select specific fields that will trigger the workflow. This step is strongly recommended to minimise unnecessary triggering and reduce the possibility of the infinite loop when a workflow updates the record.

Additional Information

Activate a Workflow

Workflows can only be edited while they are deactivated. Before a workflow can be used manually or be applied due to events it has to be activated. Before a workflow can be activated it must contain at least one step.

Ownership

A workflow can only be activated or deactivated by the workflow owner or by someone with the Act on Behalf of Another User privilege such as the system administrator. You can reassign a workflow you own by changing the owner. This field is on the administration tab.

Note that ownership of a workflow defines the scope. Changing the owner of a workflow with any scope except Organisation may change when the workflow is triggered.

Notes

Developing workflows is a collaborative process. Use the Notes tab to keep track of any changes applied to the workflow when developing new and modifying existing workflows.

This article is from the free online

Dynamics 365: Working with Power Platform Automation

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now