public void withdrawOffer(WorkItemRecord wir, HashSet<Participant> offeredSet) { if (offeredSet != null) { for (Participant p : offeredSet) { p.getWorkQueues().removeFromQueue(wir, WorkQueue.OFFERED); _rm.announceModifiedQueue(p.getID()); } } // a fired instance of a multi-instance workitem on the unoffered queue will // never have been offered, so the warning should be suppressed for those else if (!wir.getStatus().equals(WorkItemRecord.statusFired)) { _log.warn( "Workitem '" + wir.getID() + "' does not have 'Offered' status, " + "or is no longer active"); } }
private String checkParticipantHasQueuedItem(Participant p, WorkItemRecord wir, int qType) { String result = success; boolean queuedItem = false; if (p != null) { QueueSet qSet = p.getWorkQueues(); if (qSet != null) { Set<WorkItemRecord> items = qSet.getQueuedWorkItems(qType); if (items != null) { queuedItem = items.contains(wir); } } if (!queuedItem) { result = "Work item '" + wir.getID() + "' is no longer in the " + "participant's queue. Please refresh your worklist."; } } else { result = "Could not locate participant with userid supplied."; } return result; }