Delete process Definition Rest API endpoint not working


#1

Hi ,
I use the below method in my REST API to delete a process instance
DELETE /process-definition/key/{key}/delete

Though am able to successfully delete the process definition from my local camunda instance am unable to do the same on a Camunda engine deployed on a server(clustered environment).
I confirmed that the key which I have used is valid.
The error i get is like this -

HTTP Status 404 - Could not find resource for relative : /process-definition/key/Process_key_2101/delete of full path: http://<**serverIP**>:9090/engine-rest/process-definition/key/Process_key_2101/delete

My local camunda version is 7.8 and that of the server is 7.9

Please help.

Thanks and Regards,
Albin


#2

Hey Albin,

are you sure that you are running the Camunda Server on port 9090?

Cheers, Ben


#3

yes. Very sure


#4

Maybe engine-rest is not deployed on the node that you access from your client?


#5

its deployed on the same node.I have deployed a process instance there and also have updated the same.The problem is with delete rest end point only.


#6

I just verified it with a local instance of 7.9 and it works perfectly fine for me. I guess there must be something wrong with your remote server / cluster / reverse proxy setup.


#7

Hi @benhoffmann ,
Could you please confirm that you have used the below rest end point to delete the deployed process instance.
Delete /engine-rest/process-definition/key/{key}/delete

Thanks ,
Albin


#8

Yep, that’s what I used:

http://localhost:8080/engine-rest/process-definition/key/invoice/delete?cascade=true

Cheers,
Ben


#9

Thanks @benhoffmann ,
Is it mandatory to use the query parameter ‘?cascade=true’.

Regards,
Albin


#10

Hi @Albin_Chandy,

no it’s not, but in my case I had instances running and that is why I used it. If you don’t include it and have instances running, you will get a proper Rest Exception telling you that you can’t delete the definition without cascade.

Best,
Ben