skip to main content
Corticon Studio: Rule Modeling Guide : Rule dependency: Chaining and looping : Looping controls in Corticon Studio : Identifying loops : Terminating infinite loops

Try Corticon Now
Terminating infinite loops
By definition, infinite loops won't terminate by themselves. Therefore, Corticon provides a safety valve that caps the number of iterations allowed before the system automatically terminates a loop. The default setting is 100, meaning that a loop is allowed to iterate up to 100 times normally. Once the number of loops exceeds the maxloops setting, then the system automatically terminates the loop and generates a Violation error message. This means that the final number of loop iterations will be 101: 100 normal iterations plus the final iteration that causes the Violation message to appear and the loop to terminate. The Violation message is shown below:
Figure 158. Maxloop Exceeded Violation Message
If you are comfortable writing looping rules, and want the software to be able to loop more than 100 times, be sure to reset this property to a higher value. Keep in mind that the more iterations the system performs, the longer rule execution may take. If the Rulesheets you intend to deploy require high iteration counts, set the value that determines what constitutes an endless loop. For Decision Services that have Rulesheets with a Processing mode that allows looping, it is important to limit the loop count and prevent endless loops.
In the file, add the following property with your preferred maximum number of iterations allowed for any loop: