Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
Hello everyone! Hope you're well.
I've created a workflow in a BPF entity, and the trigger is the change of the active stage. Using that, I've created a business process automation, with jumps forward and backward, as long as the stage is on the traversed path. I need to, when a specific stage is the active stage, create a child incident (the BPF is on the incident entity) with diferents parameters.
The workflow has no problems with the jumps, or assign incident to a team, but when a try to create the child incident it fires 3 times (maybe more). So it creates 3 child incidents. I've checked no other workflow or plugin is on the same event.
CRM Version: Microsoft Dynamics 365 version 1612 (126.96.36.199) On Premise
Thanks in advance!
I guess your workflow is going through an infinite loop. When the new child incident created the workflow triggers and then again and again. CRM recognizes this and stops the loop; that's why you get only 3 records or a bit more without creating a lot. When a new child incident gets created probably the active stage changes and this causes the infinite loop I believe. Add extra condition (e.g. created on is more than a minute ago or so) before creating a child record which will stop the loop.
Can you explain that with a little example?
Try below for troubleshooting:
Enable auditing for the incident entity. (especially process stage field as this is the field which trigger the workflow)
Uncheck the checkbox which tells the system to delete the successful workflow instances.
Then you perform your activity and check the created incident records' audit log and workflow instances (system jobs). If you see any workflow instances for the child records we can confirm that above is the case.
Do you have 3 stages in the BPF?
We have seen this behavior before where if the workflow is set to fire on the entry or exit of a BPF stage it fires the same number of times as there are stages in the BPF.
We got round this by adding a boolean field to the BPF and triggering the workflow from that.
I'm pretty sure this has been fixed in the Online version now
Yeah, I think so (it fires same number of times as there are stages in the BPF)
I have a workflow that triggers on active stage change event of the BPF entity. For example, I have a BPF with 4 stages: A, B, C and D. If the active stage is B, I check some fields and automatically move forward to the C stage or D stage (depends of the conditions). So I think the problem is when I update the active stage within that workflow.
The expected behavior is when user manually change the active stage (using BPF UI navigation), trigger the workflow, detects the active stage and do some stuff (e.g. jump forward to a next stage). If that so, it has to fire another workflow with the new active stage.
No, I removed the workflows from the Stage entry and Exit completely.
The boolean field on the BPF is manually updated by user to Yes and then they can move to the Next stage (again manually)
Not ideal but thats the only fix we could come up with at the time
Business Applications communities