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.
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.
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.
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.
Step 5
After Step 4, after providing all the values final BPF Looks like this as shown in the below figure.
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.
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.
Note:
- Make sure every stage and data steps are discussed before implementation.
- Validate, Save and Activate BPF without fail.
- Create Workflow on the same entity.
- Create OOB workflow and make sure to enable under Available to Run the option as a child process.
- 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.