Call Workflow from BPF in Dynamics CRM

Introduction

We can enhance BPF so that a workflow can be called in between stages. So here, in this post, we see in the same vaccination use case send an email to selected contact if vaccination completed.

Step 1

Login to the required environment and go to flows and select Business process flows as shown below figure.

Call Workflow From BPF in Dynamics CRM Figure 1

Step 2

After Step 1, click on Vaccination Business process flow and click on edit and go to components and select existing stage Provide Discount as shown in the below figure.

Call Workflow From BPF in Dynamics CRM Figure 2

Step 3

After Step 2, on Provide Discount Stage select components in the right and select Workflow under Composition section, and drag and drop under triggered Process as shown in the below figure.

Call Workflow From BPF in Dynamics CRM Figure 3

Step 4

After Step 3, Select workflow and in the right side window select Trigger as Stage Exit and under  Workflows select existing OOB Workflow VaccineDiscount and name it as VaccineDiscount, click on Apply as shown in the below figure.

Call Workflow From BPF in Dynamics CRM Figure 4

Step 5

After Step 4, after providing all the values final BPF Looks like this as shown in the below figure.

Call Workflow From BPF in Dynamics CRM Figure 5

Step 6

After Step 5, validate and update BPF and then select any contact and change status of Vaccination to Yes and provide discount of 50 % and click on Next Stage as shown in the below figure.

Call Workflow From BPF in Dynamics CRM Figure 6

Step 7

After Step 6, now as a quick test navigate to Vaccine Discount Workflow process and under Process Sessions select recent execution and an email be sent to selected contact as shown in the below figure.

Call Workflow From BPF in Dynamics CRM Figure 7

Note:

  1. Make sure every stage and data steps are discussed before implementation.
  2. Validate, Save and Activate BPF without fail.
  3. Create Workflow on the same entity.
  4. Create OOB workflow and make sure to enable under Available to Run the option as a child process.
  5. BPF’s works only in Modern Driven Apps.

Conclusion

In this way, one can easily call Workflow OOB from Business Process Flow in Dynamics CRM.


Similar Articles