Commit 652afaf4 authored by Romain Bioteau's avatar Romain Bioteau Committed by rbioteau
Browse files

BS-14269

Delete process instances before deleting definition
parent ca8cf69f
...@@ -285,8 +285,9 @@ public class FormPreviewOperation implements IRunnableWithProgress { ...@@ -285,8 +285,9 @@ public class FormPreviewOperation implements IRunnableWithProgress {
} }
protected void undeployProcess(final ProcessAPI processApi, final ProcessDeploymentInfo info) throws ProcessDefinitionNotFoundException, DeletionException { protected void undeployProcess(final ProcessAPI processApi, final ProcessDeploymentInfo info) throws ProcessDefinitionNotFoundException, DeletionException {
if (info.getName().equals(lastProcessDeployed) && info.getVersion().equals(formPreviewInit.VERSION)) { if (info.getName().equals(lastProcessDeployed) && info.getVersion().equals(AbstractFormPreviewInitialization.VERSION)) {
try { try {
processApi.deleteProcessInstances(info.getProcessId(), 0, 10);
if (processApi.getProcessDeploymentInfo(info.getProcessId()).getActivationState() == ActivationState.ENABLED) { if (processApi.getProcessDeploymentInfo(info.getProcessId()).getActivationState() == ActivationState.ENABLED) {
processApi.disableProcess(info.getProcessId()); processApi.disableProcess(info.getProcessId());
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment