Loop cycle validation

We have tool which generates Camunda process schemas (BPMN, CMMN, DMMN).
In this tool analyst can easily draw the process by self without needing any developer support.

But analyst can do mistake and build easily processes which can be in loop forever.
For example: start → ServiceTask1 → ServiceTask2 → ServiceTask1 → ServiceTask2 → …
Grammatically everything in schema is correct but logically not.

Can we somehow validate such kind processes which can have endless loops?

Tnx!
Erki

There are numerous potential semantic semantic errors, which is why deploying a process without at least running some unit tests on it is strongly advised against.

I would simply suggest that every process created is validated by a JUnit test with steps though the process before deployment it’s the only way to ensure you’re free from semantic errors.

It would be nice to have “magic tester” for Camunda schemas.
“magic tester” should take all variables from BPMN, CMMN, DMMN schema conditions, set up all possible unit test data combinations for tests to cover all possible process flows.
Actually it should not be very difficult to do.

Sounds like a really interesting project - I’d love to see what you come up with.

2 Likes

@Niall I am having a similar problem.
Sometimes, our designed BPMN flow has endless loops in it. Loop in such a way that it just moves from one gate to another gate in an endless loop. These loops are not easy to detect as it happens only when certain variable & conditions are met.
I understand that this is obviously due to the bad bpmn design. However, such cases have sometimes brought the whole Camunda down because it fills up the Postgres Database 100% very quickly.
We want to be able to detect such stuck process instances before it brings down our Camunda. Any way I could be able to write some code that can detect such loops going on where the instance is just moving in a circle from one gate to another endlessly.