How to purge Flowable database

Hi,

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 ?

Regards

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
http://www.flowable.org/docs/userguide/index.html#creatingDatabaseTable

how to create -drop db at the engine start up:
http://www.flowable.org/docs/userguide/index.html#databaseConfiguration
create-drop

Martin