In 2 months ago, my company decided to upgrade the Dynamics CRM 2016 into Dynamics 365 and there is something different about Dynamics 365 Business Process Flows and here are what you need to know so that you don't get trouble when it is your turn.
Before VS Now
Before
Previously when a BPF was started, all the information regarding the BPF was stored within the record itself.
1. ProcessId
2. StageId
- The ID of the BPF that was active.
3. TravesedPath
- A comma separated string listing the GUIDs of curret path (StageId) of steps taken through the BPF.
Now
With Dynamics 365, the Business Process Flows (BPFs) are now created as Entity and stored as entity records. Instance details are no longer held as fields on the associated record.
- Active Stage Id
- The ID of the BPF step that is active.
- Activate Stage Started On
- The Date Time that the current step was started on.
- State & Status
- Each BPF Instance has its own state that allows finishing and abandoning before other BPF are run.
- Process
- The ID of the BPF.
BPFs Privilege
In Previous Version of CRM, you have controlled which roles could access your BPF by clicking "Enable Security Role".
With Dynamics 365 , it has more flexibility to deal with security role.
Workflow within Business Process Flow
With Dynamics 365, you now able to attached workflow within Business Process Flow.
Parallel Business Process Flows
As parallel business feature is introduced in Dynamics 365, users are allowed to work in same record with different Business Process Flows (BPFs) at the same time and the good news is switching BPFs no longer overwrites the previous active step , meaning that when you switch back to a precious started BPF and it will stay where you left them.
DEMO
Now we created a record using User 1. As from the below picture, the BPF is using Opportunity Sale Process.
Now opened the record as another user. The record shown as Opportunity Sales Process also.
Now we switched the process into Opportunity Sales Process 2 using another User.
The user who switched the process see Opportunity Sales Process 2
But, how about the User 1? The answer is Opportunity Sales Process.
oh.. By the way you can identify the BPF through here
Things to ask yourself and discuss with management before upgrade into Dynamics 365.
Is your company ready for this?
- please discuss with your management regarding this changes especially the parallel BPF feature.
No, my company does not want parallel BPF feature, are we able to turn off this feature?
is there any alternative ways to manipulate the parallel behavior ?
- The answer is "Yes" , but not a perfect solution at this moment.
Alternative Solution
1. Create a plugin, under pre-validate stage, loop through the user, and run the context of user and switch the process programatically
- but what if your company has thousand of users ? which causing extremely slowness on performance as well as time consuming.
- Not recommended.
2. Create a plugin or workflow activity, trigger when user switch the process and check is there any other BPFs is running? if yes , delete them. But...
- you are no longer have the ability to switch to previous started BPF with correct stage. meaning it always go back to first stage.
3. Make sure your user abandon the process before switching to another process. When another user open the record and seeing the abandoned process, they should switch to the newly started active BPF.
- more clicks and most likely user will not take this solution into account.
Maybe there are more workarounds, but at the mean time my team and I only can think of these solutions .
I hope this will help you to understand more about the new BPF feature in Dynamics 365 and Happy CRM-ing.