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 setting described in the Server Integration & Deployment Guide. com.corticon.reactor.rulebuilder.maxloops is a property 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 153. 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, be sure to inform your deployment manager so he/she can configure the target Corticon Server with a higher maxloop cap.