private void suspendCase(String caseID) { connect(); try { List<WorkItemRecord> wirList = null; wirList = _ibClient.getLiveWorkItemsForIdentifier("case", caseID, _handle); System.out.println( "---- There are totally " + (wirList == null ? "null" : Integer.valueOf(wirList.size())) + " workitems"); for (WorkItemRecord i : wirList) { if (!_ibClient.successful(_ibClient.suspendWorkItem(i.getID(), _handle))) { System.out.println(" * problem is suspending the workitem with id " + i.getID()); } } } catch (Exception e1) { System.out.println("---- error is suspendsion:" + e1.getMessage()); e1.printStackTrace(); } }
protected boolean uploadAdvice(String adviceName) throws IOException { connect(); String fileName = _specFolder + adviceName + ".yawl"; if (isUploaded(getAdviceID(adviceName))) { return true; } try { String engineURI = "http://localhost:8080/yawl/ia"; InterfaceA_EnvironmentBasedClient _interfaceAClient = new InterfaceA_EnvironmentBasedClient(engineURI); String h = _interfaceAClient.connect("admin", "YAWL"); File file = new File(fileName); if (file.exists()) { System.out.println("- - - - - - file name is " + file.getName()); System.out.println("- - - - - - file path is " + file.getPath()); System.out.println("- - - - - - file getAbsolutePath() is " + file.getAbsolutePath()); System.out.println("- - - - - - _handle is " + h); System.out.println( "- - - - - - _interfaceAClient.getBackEndURI() is " + _interfaceAClient.getBackEndURI()); String result = _interfaceAClient.uploadSpecification(file, h); if (_ibClient.successful(result)) { return true; } return false; } System.out.println("Aspect not exists"); } catch (IOException ioe) { return false; } return false; }