Cancel runnning BPMN task

How can i cancel running BPMN task which is implemeted using Async Service tasks? With this I want to keep Database entries for the cancelled task.

Hi @priyanka,
maybe this post can help you How can I delete or cancel an open human task and running process instances?

I am implementing camunda BPMN workflow with spring boot and microservices application. If i will use “Delete Process Instance” then will it persist the database entries of each service for current running process?
I want to keep the entry by setting status “cancelled” in my microservice database when cancel request is received for the process.
Please help me out , how can i do this?