/**
* Suspends the specified workitem
* @param hr the HandlerRunner instance with the workitem to suspend
*/
private boolean suspendWorkItem(HandlerRunner hr) {
WorkItemRecord wir = hr.getItem();
ArrayList children = new ArrayList();
if (wir.hasLiveStatus()) {
children.add(wir); // put item in list for next call
if (suspendWorkItemList(children)) { // suspend the item (list)
hr.setItemSuspended(); // record the action
hr.setItem(updateWIR(wir)); // refresh the stored wir
children.set(0, hr.getItem()); // ... and the list
hr.setSuspendedList(children); // record the suspended item
return true ;
}
}
else
_log.error("Can't suspend a workitem with a status of " + wir.getStatus());
return false ;
}