Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

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

Posted on by 35

Hi 

I have create a workflow that run on status change , this is my scenario( when a button click my workflow start create a custom activity and wait for complete or cancel this custom activity after that there are a change status on parent form and rest of the workflow run on form change status and create another custom activity for users in process .when i complete all of the custom activities it's ok and work correctly but when i cancel and return to back steps and complete again .i have a error 

This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again

i think the logic of the my flow is true but i can't understand why i see this error 

Can anybody help out me in this?

sorry if my English is bad...

 

 

  • Suggested answer
    muhammad.arshad Profile Picture
    muhammad.arshad 43 on at
    This workflow job was canceled because the workflow that started it included an infinite loop
    Thanks @Zahra, I tried your steps and was able to resolve my issue. I would mark it answer.
     
    ********************** START ********************
     
    -- select * from DeploymentProperties
    update DeploymentProperties SET IntColumn=16 -- old IntColumn=8
    WHERE ColumnName='MessageProcessorMaximumDepth';
     
    ********************** END ********************
     
    Thank you,
    Arshad
  • Zahra faraji Profile Picture
    Zahra faraji 12 on at
    RE: This workflow job was canceled because the workflow that started it included an infinite loop

    The error is triggered because, by default, CRM only allows for up to eight nested child workflows. When you attempt to run more, CRM will recognize it as an infinite loop. Even though you typically want to avoid a scenario where you would be calling more than eight child workflows, you may sometimes need to. So what do you do then?

    If you have an on-premises CRM solution and have access to the SQL database, you can increase the maximum limit. While this is unsupported, the setting is generally safe to do as long as you are accurate when you are typing the change into the database.

    To increase the limits, follow the steps below:

    1. Locate the setting in the MSCRM_CONFIG database in the table deploymentproperties.

    2. Find the columnname called MessageProcessorMaximumDepth.

    3. Update the value in that column.

    powerobjects.com/.../

    4. After updating the value, complete an IS reset on the CRM application server

  • Suggested answer
    Alexandr J.  Profile Picture
    Alexandr J. 246 on at
    RE: This workflow job was canceled because the workflow that started it included an infinite loop

    Hi Meysam,

    maybe you exceeded some limits, try to check this topics:

    http://rokhri.com/blog/crm-2011-this-workflow-job-was-canceled-because-the/

    https://sliong.wordpress.com/2012/05/29/crm-2011-executioncontext-depth-and-time-limit-and-scheduled-task/

    https://community.dynamics.com/crm/f/117/t/180349

    Otherwise best way is to share printscreen of your workflow, maybe you just overlook some business logic with status change, so we can check. 

    Kind regards,

    Alex

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 20,973 Super User on at
    RE: This workflow job was canceled because the workflow that started it included an infinite loop

    Hi Meysam Heydari,

    Can you post screenshots of your workflow?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans