CRM 4.0 Workflow Infinite Loop Detection RRS feed

  • Question

  • Hi guys

    I am referering here to the example posted on Microsoft Dynamics CRM Team Blog (http://blogs.msdn.com/crm/archive/2008/01/08/part-1-happy-birthday-via-workflow-using-client-side-scripting.aspx) about performing periodical tasks with workflows.

    I thought I could pick up this example for my own custom workflow to schedule periodical daily activities (like sendingout open e-mails). The trick the example uses is that the workflow calls itself (recursive) regularly (after a timeout period for example) and creates this way a (infinite) loop.

    This works fine - well 6-7 times and then the CRM System cancels the workflow due to internal infinite loop detection:

    "This workflow job was canceled because the workflow that started it included an infinite loop..."

    If im not wrong the workflow loop detection works similar to the Plug in Loop detection described at Point 13 here:


    But unfortunately I didnt find any ressources about the workflow loop detection mechanism.

    Does anyone know more about this? Is there any way to override it or to set back the loop counter?

    Thanks in advance for any comment on this issue.

    greets dilip

    Tuesday, March 18, 2008 8:19 AM


  • Hi guys

    I got a response directly from michael who wrote the birthday article on CRM Team Blog (s. above):

    If a workflow calls itself (on the same entity) more than 7 times in an hour, the 8th instance will fail with the error that you are describing. The birthday example (because the loop happens once a year), does not trigger this failure. This failure was added to prevent a workflow from creating an infinite loop.

    Thanks to Michael - this solved my problem (or at least I understood the mechanism )


    Wednesday, March 26, 2008 10:03 AM

All replies