Complex Workflows & Infinite Loop

March 30, 2017

Blogger Image

Bhavik Vyas

Senior Technical Lead

If the workflow grows in size and complexity, organizing them will become very important. Stages will play a great role in organizing workflows, as they break down a number of tasks into smaller steps and allow for task grouping. Workflows run through only one stage at a time to minimize performance stress and unresponsiveness created by large workflows.

One should avoid going back & forth to a point

Complex Workflows & Infinite Loop

A poorly designed workflow can result in an infinite loop (one of the known issues with Recursive or Scheduled Workflows) where the workflow runs indefinitely, using up available system resources like memory and disk space. However, Microsoft Dynamics has run-time logic to find and stop workflows that have entered an infinite loop. The system automatically stops the workflow. The maximum depth for a recurrence/loop is 8; however, the depth is reset after 10 minutes of inactivity. The depth can be configurable by the Microsoft Dynamics CRM administrator.

Every time a running plug-in or workflow issues a message request to the web services that triggers another plug-in or workflow to execute, the depth property of the execution context is increased. If the depth property increases to 8, then it will enter into an infinite loop.

To put it in simple terms

If you are running into situations where certain tasks are not getting done (related record updates, references not getting established between entities, moving data between the integrated systems, etc.) or you have to perform one action twice (multiple times) in-order to get the task done, then :

One of the probable causes of this could be an infinite loop or incorrectly designed workflow. As these issues are organization specific, be sure to contact us and we can provide a customized solution.

If you would like to know more about our MS Dynamics CRM Services, then do leave an enquiry with us here.

Join the conversation

What are your thoughts on this blog? Drop us a line below. We’d love to hear from you.

© 2017 Nous Infosystems Pvt. Ltd. All rights reserved.