WorkListener listener = workItems.get(workItem);
if (listener != null) {
workItem.setStatus(WorkEvent.WORK_COMPLETED);
workItem.setResult(work);
workItem.setException(exception);
WorkEvent event = new WorkEventImpl(workItem);
listener.workCompleted(event);
workItems.remove(workItem);
}
}