I have a workflow that updates a custom field on the Quote entity when the Quote Total amount is updated. When the workflow is executed the below error occurs.
“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.”
To reproduce this error, create an on demand work flow that has an update step. The update step sets the quotes deposit to 100. Execute the Workflow, then navigate to the Process Sessions area of the workflow. You will see the work flow has been executed numerous times. If you open a process session record you will see the error mentioned above.
I assume this occurs because when the quote is updated the total amount is re calculated, when the total amount is re calculated then workflow is executed, when the work flow is execute the quote is update and when the quote is update the total amount is update and so on and so on and son.
For Example
Quote Is Update
Total Amount is re calculated
- Work flow is triggered and updates quote deposit.
- Total Amount is re calculated
- Work flow is triggered and updates quote deposit.
- Total Amount is re calculated
- Work flow is triggered and updates quote deposit.
- Total Amount is re calculated
- Work flow is triggered and updates quote deposit.
- Error Occurs
I hope this makes sense
Does anyone know or have any ideas on how to solve this?