KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > swingclient > workflowadmin > monitoring > actions > CheckLimits


1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions;
2
3 import java.awt.event.ActionEvent JavaDoc;
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 /**
10  * Checks limits for selected process and its activities (if it is not finished),
11  * or for all running processes and activities if process is not selected.
12  *
13  * @author Sasa Bojanic
14  */

15 public class CheckLimits extends ActionBase {
16
17    public CheckLimits (ProcessMonitor pm) {
18       super(pm);
19    }
20
21    public void actionPerformed(ActionEvent JavaDoc 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             workflowAdmin.getLimitAdmin().checkLimits(proc.key());
30          } else {
31             workflowAdmin.getLimitAdmin().checkLimits();
32          }
33       } catch (Exception JavaDoc ex){
34          ex.printStackTrace();
35       }
36    }
37 }
38
Popular Tags