Hello,
What is the best way to physically delete (Delete from DB) a running human task by it’s id.
I’m developping my own API, the process engine modification rest API does not respond to my need…
Thank you
Maha
Hello,
What is the best way to physically delete (Delete from DB) a running human task by it’s id.
I’m developping my own API, the process engine modification rest API does not respond to my need…
Thank you
Maha
Hi Maha,
the method is not on the API level (not in the TaskService
), but you can have a look on the DeleteTaskCmd
.
There are two ways of using it - either you build the command yourself and submit it to the CommandExecutor
or you downcast your TaskService
to the TaskServiceImpl
and call the method there:
Cheers,
Simon
@zambrovski when deleting an active user task within a running process instance, would the process token just transition to the next step in the process flow? Also, we are on 7.9.0 version of camunda and when using TaskService to delete the task, the engine complains that an active task cannot be deleted. Is this not supported in 7.9.0 version of camunda?
Caused by: org.camunda.bpm.engine.ProcessEngineException: The task cannot be deleted because is part of a running process
Hi,
you should consider to update to a decent version of Camunda. Current version is 7.15, and it is produced twice a year.
In general, deleting tasks attached to process execution seem to be very hacky… You should solve this using BPMN boundary event… If the Task is not attached to the execution, it should be not a problem to delete it, I think…
Just an idea: don’t know for sure, but maybe you need to suspend the execution first, to delete it?
Cheers,
Simon