How to purge Flowable database


when i execute

taskService.deleteTask(task.getId(), true);

i get the following error message :
“The Task cannot be deleted because is part of a running process”.

What is the better way to purge the content of the database of FLowable ?


i found the solution. Maybe it will be useful for another beginner

runtimeService.deleteProcessInstance(task.getProcessInstanceId()," ");
taskService.deleteTask(task.getId(), true);

Extract from the javadoc
deleteProcessInstance(String processInstanceId, String deleteReason)

:biking_woman: :biking_man: :biking_man: :biking_woman: :biking_man:

There are create/drop sql scripts for the DB

how to create -drop db at the engine start up: