public void internalExecuteWorkItem(WorkItem workItem) {
((WorkItemImpl) workItem).setId(++workItemCounter);
internalAddWorkItem(workItem);
WorkItemHandler handler = this.workItemHandlers.get(workItem.getName());
if (handler != null) {
handler.executeWorkItem(workItem, this);
} else throw new WorkItemHandlerNotFoundException( "Could not find work item handler for " + workItem.getName(),
workItem.getName() );
}
public void internalAddWorkItem(WorkItem workItem) {