1 package org.enhydra.shark.swingclient.workflowadmin.monitoring.actions; 2 3 import java.awt.event.*; 4 5 import javax.swing.*; 6 7 8 import org.enhydra.shark.api.client.wfmodel.*; 9 import org.enhydra.jawe.xml.elements.*; 10 import org.enhydra.shark.swingclient.*; 11 import org.enhydra.shark.swingclient.workflowadmin.monitoring.*; 12 13 19 public class ResumeActivity extends ActionBase { 20 21 public ResumeActivity (ManageActivities ma) { 22 super(ma); 23 } 24 25 public void actionPerformed(ActionEvent e) { 26 ManageActivities ma=(ManageActivities)actionPanel; 27 Activity act=ma.getSelectedActivity(); 28 try { 29 WfActivity lastActivityForDefinition=ma.getLastActivityForDefinition(act,"open.not_running.suspended",0); 30 lastActivityForDefinition.resume(); 31 ma.updateListDisplay(act); 32 JOptionPane.showMessageDialog(ma.getWindow(), 33 lastActivityForDefinition.name()+": "+ 34 ResourceManager.getLanguageDependentString( 35 "MessageActivityIsResumed"), 36 SharkClient.getAppTitle(),JOptionPane.WARNING_MESSAGE); 37 } catch (Exception ex) { 38 JOptionPane.showMessageDialog(ma.getWindow(), 39 ResourceManager.getLanguageDependentString( 40 "MessageActivityCannotBeResumed"), 41 SharkClient.getAppTitle(),JOptionPane.WARNING_MESSAGE); 42 43 } 44 } 45 46 } 47 48 | Popular Tags |