locked
Real-time workflow in case entity crashes with error message infinite loop RRS feed

  • Question

  • I created a workflow for the case entity for two custom (whole number - duration) fields.
    The workflow copies the data from one field to another (increment by) when the records is saved.

    But a error message pops-up when we want to save the record.

    Business Process Error
    This workflow job was canceled because the workflow that started it includes an infinite loop. Correct the workflow logic and try again.

    We are working on CRM 2015 with update rollup 1 on-premise


    Comments from the process session:

    Sync workflow failed with error message - Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again. For information about workflow logic, see Help.Detail:
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147220891</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
        <KeyValuePairOfstringanyType>
          <d2p1:key>OperationStatus</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">0</d2p1:value>
        </KeyValuePairOfstringanyType>
        <KeyValuePairOfstringanyType>
          <d2p1:key>SubErrorCode</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">-2146233088</d2p1:value>
        </KeyValuePairOfstringanyType>
      </ErrorDetails>
      <Message>This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again. For information about workflow logic, see Help.</Message>
      <Timestamp>2015-06-01T09:33:10.6102528Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147220891</ErrorCode>
        <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
          <KeyValuePairOfstringanyType>
            <d3p1:key>OperationStatus</d3p1:key>
            <d3p1:value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:int">0</d3p1:value>
          </KeyValuePairOfstringanyType>
          <KeyValuePairOfstringanyType>
            <d3p1:key>SubErrorCode</d3p1:key>
            <d3p1:value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:int">-2146233088</d3p1:value>
          </KeyValuePairOfstringanyType>
        </ErrorDetails>
        <Message>This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again. For information about workflow logic, see Help.</Message>
        <Timestamp>2015-06-01T09:33:10.6102528Z</Timestamp>
        <InnerFault>
          <ErrorCode>-2147220891</ErrorCode>
          <ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
            <KeyValuePairOfstringanyType>
              <d4p1:key>OperationStatus</d4p1:key>
              <d4p1:value xmlns:d6p1="http://www.w3.org/2001/XMLSchema" i:type="d6p1:int">0</d4p1:value>
            </KeyValuePairOfstringanyType>
            <KeyValuePairOfstringanyType>
              <d4p1:key>SubErrorCode</d4p1:key>
              <d4p1:value xmlns:d6p1="http://www.w3.org/2001/XMLSchema" i:type="d6p1:int">-2146233088</d4p1:value>
            </KeyValuePairOfstringanyType>
          </ErrorDetails>
          <Message>This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again. For information about workflow logic, see Help.</Message>
          <Timestamp>2015-06-01T09:33:10.6102528Z</Timestamp>
          <InnerFault i:nil="true" />
          <TraceText i:nil="true" />
        </InnerFault>
        <TraceText i:nil="true" />
      </InnerFault>
      <TraceText>
    [Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
    [4556af1f-4108-e511-80e2-00155dbc3922: ]
    Starting sync workflow 'Case - Copy value from Time Worked On to field Overall Working Time', Id: 3d56af1f-4108-e511-80e2-00155dbc3922
    Entering ConditionStep2_step:
    Entering UpdateStep4_step:
    Sync workflow 'Case - Copy value from Time Worked On to field Overall Working Time' terminated with error 'This workflow job was canceled because the workflow that started it included an infinite loop. Correct the workflow logic and try again. For information about workflow logic, see Help.'
    </TraceText>
    </OrganizationServiceFault>
       at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
       at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
       at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
       at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
    , error code - -2147220891

    Monday, June 1, 2015 9:49 AM

All replies

  • Is the workflow testing for value changes to both fields?  Seems like you would only want it to test for a change to field 1, which then updates field 2.  If you are testing for both, then it would make sense that you would get an infinite loop error.

    Good luck!

    Monday, June 1, 2015 12:54 PM