Model business process flows

 

Updated: November 29, 2016

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

A business process flow lets you create more efficient and streamlined sales, service, and other business processes. Having high performing processes in place will help you to increase your win rates, improve customer satisfaction, and grow your revenue.

A business process flow creates a visualization of your business process by placing special controls at the top of the entity forms. Users are guided through various stages of sales, marketing, or service processes towards completion. Each process supports multiple stages and steps. You can add or remove steps, change the order of stages, or add new entities to the business process flow.

With December 2016 update for Dynamics 365 (online and on-premises), different business process flow definitions can be associated with different roles and the instances can run concurrently against the same entity record. Users can switch between concurrent business process instances and resume their work at a current stage in the process. The new visual drag-and-drop process designer allows creating processes, such as business process flows and task flows, as well as business rules, using an intuitive graphical interface in Dynamics 365.

For detailed information about processes, see TechNet: Business Process Flows

A business process flow definition is stored in the Workflow entity. Business process flow is one of the categories of the process. Other process categories include action, workflow, and dialog. For more information, see Dynamics 365 Process categories. Custom entities and entities that have updated UI forms can participate in the business process flow. The updated UI entities have the IsAIRUpdated property set to true. To enable an entity for the business process flow, set the IsBusinessProcessEnabled property to true.

System_CAPS_importantImportant

Enabling an entity for business process flow is a one way process. You can’t reverse it.

Use the new visual business process flow designer in Dynamics 365 to define a business process flow. The Workflow entity stores a business process flow definition, and the following attribute values must be specified in the Workflow entity record for a business process flow: name, category, businessprocesstype, primaryentity, uniquename, and xaml. For information about these attributes, see workflow EntityType. By default, a business process flow record is created in the Draft state.

Before you can use the process flow, you have to activate it. To activate it, you must have the prvActivateBusinessProcessFlow privilege for the Workflow entity. Use the UpdateRequest message to set the state of the Workflow entity record to Activated. More information:  Perform specialized operations using Update

Once you activate a business process flow definition (by changing the state of the corresponding Workflow entity record), a custom entity with the following name is automatically created to store the business process flow instances: "<activesolutionprefix>_<uniquename>".

For example, if you specified unique name of the business process flow definition as "myuniquebpf1" and are using the default publisher for your active solution, the name of the custom entity created for storing process instances will be "new_myuniquebpf1".

If the uniquename value isn't available for a business process flow definition, for example if the business process flow was imported as part of solution from an earlier version, the default name of the custom entity will be "<activesolutionprefix>_bpf_<GUID_BPF_Definition>:

System_CAPS_noteNote

The business process flow records available as part of the Dynamics 365 sample data use system entities to store the corresponding business process flow instance records. Couple of the sample business process flow entity records are opportunitysalesprocess EntityType and leadtoopportunitysalesprocess EntityType. For information about installing sample data in Dynamics 365, see Sample data for Microsoft Dynamics 365.

The custom entity that is automatically created on activating a business process flow definition stores all the process instances for the business process flow definition. The custom entity supports programmatic creation and management of records (process instances) using Web API and CRM 2011 endpoint. For example, if the name of the custom entity is "new_myuniquebpf1", you can use the following Web API query to retrieve all the records (process instances) in the custom entity:

[Organization URI]/api/data/v8.2/new_myuniquebpf1s

A process instance can have one of the following states: Active, Finished, or Aborted.

Use the SetProcess Action or SetProcessRequest message to set another business process flow instance as the active process instance for the target entity record. If there isn't any active process instance for the target entity record and the specified process definition, a new business process flow instance will be created. An active process instance is the one that is visible on the UI for the entity record. This is also called as switching to another process instance for the entity record. Since each business process flow instance maintains its own stage and step progress information, switching to another business process instance does not cause you to lose the progress information, and you resume from the same point where you were last time.

Use the new RetrieveProcessInstances Function or the RetrieveProcessInstancesRequest message to retrieve all the process instances for an entity record across all business process definitions.

Use the new RetrieveActivePath Function or RetrieveActivePathRequest message to retrieve a collection of stages currently in the active path for a business process flow instance.

With Dynamics 365 there is a client-side object you can use to interact with business process flows in your form scripts. Business process flows trigger client-side events every time a process is either applied to a record, the stage is changed, or its status is changed to Active, Finished, or Aborted. More information:  Write scripts for business process flows

Per entity, the default value for the maximum number of activated business process flows is 10. You can specify a different value by using the Organization.MaximumActiveBusinessProcessFlowsAllowedPerEntity attribute. However, if the value is greater than 10, you may see a decrease in your system’s performance when you switch processes or open a record that has an assigned business process flow. This may be especially noticeable if processes span multiple entities.

The following settings aren’t customizable:

  • The maximum number of stages per entity in the process is 30.

  • The maximum number of steps in each stage is 30.

  • The maximum number of entities that can participate in the process flow is 5.

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright

Community Additions

ADD
Show: