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(); } }