1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions; 2 3 import java.awt.event.ActionEvent ; 4 import org.enhydra.shark.api.client.wfmodel.WfProcess; 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 15 public class CheckDeadlines extends ActionBase { 16 17 public CheckDeadlines (ProcessMonitor pm) { 18 super(pm); 19 } 20 21 public void actionPerformed(ActionEvent e) { 22 ProcessMonitor pm=(ProcessMonitor)actionPanel; 23 SharkAdmin workflowAdmin=pm.getWorkflowAdmin(); 24 25 WfProcess proc=pm.getProcessViewer().getCurrentProcess(); 26 27 try { 28 if (proc!=null) { 29 SharkAdmin.getDeadlineAdmin().checkDeadlines(proc.key()); 30 } else { 31 String [] failed = SharkAdmin.getDeadlineAdmin().checkDeadlines(5, 12); 32 for (int i = 0; i < failed.length; i++) { 33 SharkAdmin.getDeadlineAdmin().checkDeadlines(failed[i]); 34 } 35 } 36 workflowAdmin.refresh(true); 37 } catch (Exception ex){ 38 } 39 } 40 } 41 | Popular Tags |