Remove old/unwanted process definitions

3,682 views
Skip to first unread message

Joao Paulo Rabelo

unread,
Jan 2, 2014, 9:51:53 AM1/2/14
to camunda-...@googlegroups.com
Hi all,

I'm studying the camunda to change my actual BPMS and I can't find how to completely remove (undeploy) a process definition. I have a scenario that we have dozens of processes and we can (with some hard work) automate the entire process, and the definition turns unnecessary.

I want to completely remove the definition to keep clean the definition requests and the cockpit. Is that possible?

Regards,
Joao

Daniel Meyer

unread,
Jan 6, 2014, 11:05:18 AM1/6/14
to camunda-...@googlegroups.com
Hi Joao,

this is currenlty a missing feature in cockpit. Here is the corresponding feature request:

Until this is ready, you can always use the process engine Java API to delete a deployment: 
Or you can develop your custom cockpit plugin providing this fearture: 

Cheers,
Daniel Meyer

galen...@gmail.com

unread,
Feb 27, 2014, 12:39:19 PM2/27/14
to camunda-...@googlegroups.com
Hi Daniel,

I'm trying to use the RepositoryService to undeploy a process definition in Java code. To do this I:

1) Find the process definition's deployment ID

2) Call repositoryService.deleteDeployment(deploymentId);

The problem is, is that this deletes almost all of the process definitions I have (except for one). The way I load process definitions upon startup of the server is through my ProcessApplication (i.e. processes.xml and isScanForProcessDefinitions=true).

Three questions:

1) Is it expected to have multiple process definitions with the same deployment ID?

2) Why does only one out my 17 process definitions get a different ID? (all my process definitions are in the same directory in my ProcessApplication)

3) Is there a way to delete a particular process definition in my case (for example by procDef key instead of deployment ID)?

++++++++++++++++++++++++++++++

HERE IS MY DATABASE TABLE:

mysql> select DEPLOYMENT_ID_, count(*) from act_re_procdef group by DEPLOYMENT_ID_;
+--------------------------------------+----------+
| DEPLOYMENT_ID_ | count(*) |
+--------------------------------------+----------+
| 60b0ced6-9fd4-11e3-95e0-10ddb1f141ab | 16 |
| d181094b-9fd2-11e3-8b0e-10ddb1f141ab | 1 |
+--------------------------------------+----------+
2 rows in set (0.00 sec)

Thanks,
Galen

galen...@gmail.com

unread,
Mar 6, 2014, 12:06:53 PM3/6/14
to camunda-...@googlegroups.com, galen...@gmail.com
Hi,

I'm mostly concerned about my question #3 (see above) about deleting a particular process definition. Any clarification or guidance on how to do this would be great. Also, if not available, is this functionality on the roadmap?

Thanks,
Galen

Christian Lipphardt

unread,
Mar 6, 2014, 1:41:54 PM3/6/14
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Galen,

There is currently no issue for this kind of functionality. So you are welcome to create an issue for it. Deleting a process definition is not trivial to do. Eg what if your process bpmn xml resides inside a WAR deployment (Process Application). What should happen on redeployment / restart of the application server. So it is quite a bit of brain storming necessary for this feature.

Cheers,
Christian

galen...@gmail.com

unread,
Mar 6, 2014, 4:57:50 PM3/6/14
to camunda-...@googlegroups.com, galen...@gmail.com
Hi Christian,

Does the repositoryService.deleteDeployment method also have the same issue of redployment/restart? I'm assuming it would.

The more I think about it, for my purposes, I would probably be OK with simply suspending the process definition, instead of having to remove it completely. So I probably don't need to create an issue. I haven't tried it yet, but I'm assuming the process definition will remain suspended when a redployment/restart occurs.

Thanks for your input,
Galen

Reply all
Reply to author
Forward
0 new messages