1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions; 2 3 import java.awt.event.*; 4 import java.util.*; 5 6 7 import org.enhydra.shark.api.client.wfmodel.*; 8 import org.enhydra.jawe.xml.elements.*; 9 import org.enhydra.shark.swingclient.*; 10 import org.enhydra.shark.swingclient.workflowadmin.*; 11 import org.enhydra.shark.swingclient.workflowadmin.monitoring.*; 12 13 19 public class ActivityManagement extends ActionBase { 20 21 public ActivityManagement (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 WfProcess proc=pm.getProcessViewer().getCurrentProcess(); 30 if (proc!=null) { 31 List allActs=new ArrayList(); 32 33 org.enhydra.jawe.xml.elements.Package pkg= 34 pm.getProcessViewer().getCurrentPackage(); 35 WorkflowProcesses wps=(WorkflowProcesses)pkg.get("WorkflowProcesses"); 36 String pdId=""; 37 try {pdId=SharkAdmin.getAdminMiscUtilities().getProcessDefinitionId(proc.key());}catch (Exception ex){} 38 WorkflowProcess wp=wps.getWorkflowProcess(pdId); 39 Activities acts=(Activities)wp.get("Activities"); 40 allActs.addAll(acts.toCollection()); 42 43 51 52 ManageActivities mad= 53 new ManageActivities(pm,proc,allActs); 54 mad.showDialog(); 55 } else { 56 System.err.println("Process is not selected"); 57 } 58 } 59 60 } 61 | Popular Tags |