KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions;
2
3 import java.awt.event.*;
4
5
6
7 import org.enhydra.shark.api.client.wfmodel.*;
8 import org.enhydra.shark.swingclient.*;
9 import org.enhydra.shark.swingclient.workflowadmin.*;
10 import org.enhydra.shark.swingclient.workflowadmin.monitoring.*;
11 import org.enhydra.jawe.xml.elements.*;
12
13 /**
14  * Shows the history events for selected process.
15  *
16  * @author Sasa Bojanic
17  * @version 1.0
18  */

19 public class ShowHistory extends ActionBase {
20
21    public ShowHistory (ProcessMonitor pm) {
22       super(pm);
23    }
24
25    public void actionPerformed(ActionEvent e) {
26       ProcessMonitor pm=(ProcessMonitor)actionPanel;
27       SharkAdmin workflowAdmin=pm.getWorkflowAdmin();
28
29       try {
30          WfProcess proc=pm.getProcessViewer().getCurrentProcess();
31          if (proc!=null) {
32             org.enhydra.jawe.xml.elements.Package pkg=
33                   pm.getProcessViewer().getCurrentPackage();
34             WorkflowProcesses wps=(WorkflowProcesses)pkg.get("WorkflowProcesses");
35             String JavaDoc pdId="";
36             try {pdId=SharkAdmin.getAdminMiscUtilities().getProcessDefinitionId(proc.key());}catch (Exception JavaDoc ex){}
37             WorkflowProcess wp=wps.getWorkflowProcess(pdId);
38             HistoryTable ht=
39                   new HistoryTable(pm,proc,wp);
40             ht.showDialog();
41          }
42       } catch (Exception JavaDoc ex){}
43    }
44 }
45
Popular Tags