KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions;
2
3 import java.awt.event.*;
4
5
6 import org.enhydra.shark.api.client.wfmodel.*;
7 import org.enhydra.shark.swingclient.*;
8 import org.enhydra.shark.swingclient.workflowadmin.*;
9 import org.enhydra.shark.swingclient.workflowadmin.monitoring.*;
10
11 /**
12  * Starts selected process.
13  *
14  * @author Sasa Bojanic
15  * @version 1.0
16  */

17 public class StartProcess extends ActionBase {
18
19    public StartProcess (ProcessMonitor pm) {
20       super(pm);
21    }
22
23    public void actionPerformed(ActionEvent e) {
24       ProcessMonitor pm=(ProcessMonitor)actionPanel;
25       SharkAdmin workflowAdmin=pm.getWorkflowAdmin();
26
27       try {
28          WfProcess proc=pm.getProcessViewer().getCurrentProcess();
29          if (proc!=null) {
30             try{
31                proc.start();
32             } catch (Exception JavaDoc ex) {}
33             workflowAdmin.refresh(true);
34          }
35       } catch (Exception JavaDoc ex){}
36    }
37 }
38
Popular Tags