1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions; 2 3 import java.awt.event.ActionEvent ; 4 5 import org.enhydra.shark.swingclient.ActionBase; 6 import org.enhydra.shark.swingclient.workflowadmin.SharkAdmin; 7 import org.enhydra.shark.swingclient.workflowadmin.monitoring.ProcessMonitor; 8 9 14 public class DeleteFinishedProcesses extends ActionBase { 15 16 public DeleteFinishedProcesses (ProcessMonitor pm) { 17 super(pm); 18 } 19 20 public void actionPerformed(ActionEvent e) { 21 ProcessMonitor pm=(ProcessMonitor)actionPanel; 22 SharkAdmin workflowAdmin=pm.getWorkflowAdmin(); 23 try { 24 String [] failed = SharkAdmin.getExecAmin().deleteClosedProcesses(5, 12); 25 for (int i = 0; i < failed.length; i++) { 26 SharkAdmin.getExecAmin().deleteClosedProcess(failed[i]); 27 } 28 workflowAdmin.getEngineTreeModel().clear(); 29 workflowAdmin.refresh(true); 30 } catch (Exception ex){ 31 ex.printStackTrace(); 32 } 33 } 34 } 35 | Popular Tags |