Is there a way to clean up processes in MySql?

Hello!

we use flowable with Spring boot, for a flaw in our design, we have plenty of old processes that will never make it to a end Event.

We see a constant increase of resources in our mysql, can these processes be responsible of that increase because they get stored somewhere and never deleted? is there a way to clean / delete those processes?

we have started around 10M processes, around 15% of them will never reach and end event.

Thank you!

Likely you have two sources of “bloat”.
All process instances populate two different sets of tables.

  1. Runtime tables - hold the status of currently running processes.
  2. History tables - hold the status of all running AND closed processes.

If you don’t have an archive/truncate strategy then history tables will grow forever.
You can manage history table truncation automatically using the “Housekeeping” feature of Flowable:

As for running instances that are never completed, these will remain in the runtime tables until such time as they are completed and can be removed.

If you are able to identify these instance via a query (i.e. process definition id, deployment id or similar) then you can write a simple class to close these instances out and then let your archive strategy deal with them.

Hope this helps,
Greg

Thank you so much Greg! We will start removing the history tables and I think we have a way to search all the uncompleted instances, I think the best way is to follow what you say and force those instances to an end event.

Thank you!