public void internalAbortWorkItem(long id) {
WorkItemImpl workItem = (WorkItemImpl) workItems.get(new Long(id));
// work item may have been aborted
if (workItem != null) {
WorkItemHandler handler = this.workItemHandlers.get(workItem.getName());
if (handler != null) {
handler.abortWorkItem(workItem, this);
} else {
workItems.remove( workItem.getId() );
throw new WorkItemHandlerNotFoundException( "Could not find work item handler for " + workItem.getName(),
workItem.getName() );
}