Using Configurable Values to Detect Potential Infinite Loops
Introduction
When the BPM engine evaluates tasks, there is a potential risk of entering an infinite loop. To mitigate this, the engine provides safeguards based on two configurable limits:
-
A maximum execution duration (time-based)
-
A maximum recursion depth (depth-based)
These values are configurable in the App BPM settings. Default values are maintained for backward compatibility.
| A suspicion of infinite loop occurs when both of these limits are exceeded simultaneously. |
Configuration
Max Duration (in seconds) for Task Execution
This setting defines the maximum time allowed for recursive task evaluation.
-
Default value:
10seconds -
Behavior: If the task evaluation exceeds this duration, combined with exceeding the depth limit, an infinite loop is suspected and the execution is interrupted.
| Setting a negative value disables the time limit entirely. Only use this if you fully understand the implications, as it may cause the application to hang indefinitely. |
Max Depth of Recursive Task Execution
This setting defines the maximum depth for recursive task evaluation.
-
Default value:
100 -
Behavior: If the task evaluation exceeds this depth, combined with exceeding the duration limit, an infinite loop is suspected and the execution is interrupted.
| Setting a negative value disables the depth limit entirely. Only use this if you fully understand the implications, as it may lead to stack overflow errors. |