1 package org.enhydra.shark.swingclient.workflowadmin.instantiation.actions; 2 3 import java.awt.event.ActionEvent ; 4 import org.enhydra.jawe.xml.elements.Package; 5 import org.enhydra.shark.api.client.wfmodel.WfProcessMgr; 6 import org.enhydra.shark.api.client.wfservice.AdminMisc; 7 import org.enhydra.shark.api.client.wfservice.ExecutionAdministration; 8 import org.enhydra.shark.swingclient.ActionBase; 9 import org.enhydra.shark.swingclient.workflowadmin.SharkAdmin; 10 import org.enhydra.shark.swingclient.workflowadmin.instantiation.ProcessInstantiationManagement; 11 12 18 public class ReevaluateAssignments extends ActionBase { 19 20 public ReevaluateAssignments (ProcessInstantiationManagement pim) { 21 super(pim); 22 } 23 24 public void actionPerformed(ActionEvent e) { 25 ProcessInstantiationManagement pim=(ProcessInstantiationManagement)actionPanel; 26 ExecutionAdministration ea=SharkAdmin.getExecAmin(); 27 Object userObject=pim.getSelectedUserObject(); 28 try { 29 if (userObject instanceof Package ) { 30 String pkgId=((Package )userObject).get("Id").toString(); 31 ea.reevaluateAssignments(pkgId); 32 } else if (userObject instanceof WfProcessMgr) { 33 AdminMisc am=SharkAdmin.getAdminMiscUtilities(); 34 String pkgId=am.getProcessMgrPkgId(((WfProcessMgr)userObject).name()); 35 String pDefId=am.getProcessMgrProcDefId(((WfProcessMgr)userObject).name()); 36 ea.reevaluateAssignments(pkgId,pDefId); 37 } else { 38 ea.reevaluateAssignments(); 39 } 40 } catch (Exception ex) { 41 ex.printStackTrace(); 42 } 43 44 } 45 } 46 | Popular Tags |