Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
To summarize the process :
One of our clients environment we have SLA on a custom activity entity. When an incident created, we create its activity then sla step begins.
After its time expired, SLA workflow tries to update the field "Expired", then on the update of "Expired" field another async workflow triggers and update the record statuscode. We have 3 different plugins that trigger on this entitiy statuscode changes. These plugins do different things but one of them updates back Incident level so another task gets created and new SLA starts for this task. This goes on depends how many sla steps there are. The 3 plugins that triggers on statuscode are at same level. Another plugin that triggers when Incident Sla level updated is a child plugin and it creates a new task as i mentioned.
On this custom incident task entity, When the first step begins and after its expired, SLA Workflow tries to update as Expired. But it can't because plugins throw exception of infinite loop. But when i try to update this "Expired" field as manually from form, everything works as good. So i debugged it, when these plugins triggered from SLA wf, they come as depth 8. If i update from form, it comes as depth 2. I changed MaximumDepth from 8 to 15 to observe. Now most of them works fine but there is still infinite loop errors happen. If something stuck in loop, same things should happen when i update this field on the form. What should i check or do you have any idea why is this happening?
I recommend you a couple of things.
-First, validate you are using latest available SDK .dlls version.
-Check this link docs.microsoft.com/.../limit-registration-plugins-retrieve-retrievemultiple
-Add more conditions on your plugins/workflows so then get the logic executed only under specific scenarios.
-Validate the execution order of your plugins.
I would suggest you to check SLA Detail and criteria. It mostly goes in loop because of criteria mentioned in that particular SLA. Can hit and try by removing any criteria or sla detail.
Also would suggest you to manage your business logic in such a way that particular plugin will trigger on appropriate action only. you can set any flag along with Status change.
I created a workflow that works on demand just to set "Expired" to yes on records that SLA Workflows occurs errors. So while im trying to solve the problem, the proccess can continue. I automated it to work on in every couple minutes. I filter the records and run this workflow. And i realized the source of error not sla workflows. Same error occurs while if i try to use this workflow. It works on demand updates only "Expired" field. On the same records if i dont use workflow and update the field from the form i see initial triggered plugins depth 2 , if i use workflow i see inital depth 8. There is only 1 workflow triggers after i set Expired. It changes status code. My plugins business logic seems fine. One is updating the sla level on incident others validating the process. It don't seems logical to me but i am trying to understand why depth is increasing
Since this problem solved for %80 of the records when i increased the depth 8 to 15, it looks like not there is actually a loop. For some reason if workflow changes the field initial plugin start with depth 8. I am trying to find that. Thats why i dont want to change the process the way it runs.
When i check trace logs there is not a plugin runs over and over again.
Thanks so much for the information, my recommendation for this scenario is to open a ticket with Microsoft Support since this seems to be something that would require a deep investigation.
Business Applications communities