cancel
Showing results for 
Search instead for 
Did you mean: 

Patch for AdminRunningInstancePanel

michele1
Champ in-the-making
Champ in-the-making
I attach a small patch to fix a small bug I found on the administration panel of Activiti Explorer 5.11.

I've a process with subprocesses that had several update of the process. I've developed a new revision, deployed it via the activiti explorer panel, then I decided to delete the older version of the process, that were used only for ended process.

Unfortunately after this operation, looking for the running instances I got a lonely 'null' message an no list of running processes.

I've made a small fix in AdminRunningInstancesPanel.java and attached the diff file here.


— AdminRunningInstancesPanel.java.old 2013-02-25 17:21:16.796051880 +0100
+++ AdminRunningInstancesPanel.java     2013-02-25 17:18:36.880050715 +0100
@@ -151,15 +150,19 @@
              ManagementProcessDefinition managementDefinition = null;
              if(runningDefinitions.containsKey(processDefinitionId)) {
                managementDefinition = runningDefinitions.get(processDefinitionId);
              } else {
                ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).singleResult();
+                                       if (definition == null) {
+                                               // this process has a missing definition - skip
+                                               continue;
+                                       }
                managementDefinition = new ManagementProcessDefinition();
                managementDefinition.processDefinition = definition;
                managementDefinition.runningInstances = new ArrayList<HistoricProcessInstance>();
                runningDefinitions.put(definition.getId(), managementDefinition);
              }
              managementDefinition.runningInstances.add(instance);
       }
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi Michele,

Thanks, I've pushed the patch to the Github master, also for the completed panel.

Best regards,