KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions;
2
3 import java.awt.event.*;
4 import java.util.Map JavaDoc;
5
6
7
8 import org.enhydra.shark.api.client.wfmodel.*;
9 import org.enhydra.shark.swingclient.*;
10 import org.enhydra.shark.swingclient.workflowadmin.*;
11 import org.enhydra.shark.swingclient.workflowadmin.monitoring.*;
12
13 /**
14  * Shows a dialog for editing selected process variables.
15  *
16  * @author Sasa Bojanic
17  * @version 1.0
18  */

19 public class ProcessVariables extends ActionBase {
20
21    public ProcessVariables (ProcessMonitor pm) {
22       super(pm);
23    }
24    public void actionPerformed(ActionEvent e) {
25       ProcessMonitor pm=(ProcessMonitor)actionPanel;
26       SharkAdmin workflowAdmin=pm.getWorkflowAdmin();
27
28       WfProcess proc=pm.getProcessViewer().getCurrentProcess();
29       if (proc!=null) {
30          try {
31             Map JavaDoc procContext=proc.process_context();
32             UpdateVariables upvd=
33                new UpdateVariables(
34                workflowAdmin.getFrame(),
35                ResourceManager.getLanguageDependentString("DialogUpdateProcessVariables"),
36                proc.key(),
37                procContext,
38                null);
39             upvd.showDialog();
40             if (procContext!=null) {
41                proc.set_process_context(procContext);
42             }
43          } catch (Exception JavaDoc ex) {}
44       }
45    }
46
47 }
48
Popular Tags