cancel
Showing results for 
Search instead for 
Did you mean: 

API to delete process definition stored in repository

harrison_deng
Champ in-the-making
Champ in-the-making
Is there a API to delete the process definition stored in the repository?
I can not find in the repositoryService class.
E.g. delete by Process Definition Id.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
You should delete the whole deployment instead.

harrison_deng
Champ in-the-making
Champ in-the-making
You should delete the whole deployment instead.

Oh.It's a pity!I would prefer to delete it from the database.

I ran the java code for test and add the process definition to the repository again and again.So there are a lot of the versions in the repository.When I tried to delete them,but I could not find the corresponding API.

h_ter_schuur
Champ in-the-making
Champ in-the-making
You should be able to delete the previous deployments and keep the latest deployment using the API. You can delete the older deployments (containing the previous versions of the process definition) using the RepositoryService.deleteDeployment(java.lang.String, boolean) method to delete the deployments.

Best regards,