I have a process model that loops itself. In the screenshot I'm having an error in start process which I labeled as Node 2. The error is the max subprocess depth limit of 100 would be exceeded.
My question is, if the subprocess depth limit is 100, the main process as count 1 in the process depth counter, the next start process smart service as 2, and the recursion as 3. Shouldn't it run only around 50 times? I checked logs and the process run 100 times, before getting an error in Node 2 in the screenshot. I think my calculation is just wrong but I need clarifications on how is this calculated.
Discussion posts and replies are publicly visible
The depth counter only increments when you start a subprocess. Your main process is depth 1, Each time Node 2 starts a new subprocess instance, it goes 2, 3, 4... up to 100. That's why it ran 100 times.The recursion itself doesn't add extra depth per iteration ; only the subprocess initiation does. So you get exactly 100 iterations, not ~50.
I do highly recommend to avoid any recursive approach in process design.