Completing/Deleting "Stuck" CMMN Instances

I have a CMMN that uses the event registry to listen to a few dozen events. Some of the earlier CMMN Deployments are still running and probably cant be completed because of incorrect event correlation.
Some of these are marked completable some are not.

What is the best way just to get rid of active cmmn instance, regardless of what the Planned Items state is?

I am almost at the point where I will write a SQL script to delete them, but dont know the downside of doing this way.

Hi tjmac44,

SQL script: if you know what flowable does with cmmn and bpmn data you can do that. (do not forget async jobs, variables, history (update or delete…))

I would prefer to terminate cases or delete deployment (in that case history is also deleted), through rest endpoint or java api. I am just working on the tool which will be able to manage flowable items from the command line.


Deleting deployments is probably out as data needs to be preserved from case instances that completed successfully.

I do not see in the flowable api how to accomplish a terminate if the case instance still has active plan items.

cmmnRuntimeService.terminateCaseInstance(String caseInstanceId);

1 Like

Thanks again Martin.

The CLI project looks interesting. Can see uses when developing locally.

Found test case here: