PersistenceContext context = ((PersistenceContextManager) env.get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )).getCommandScopedPersistenceContext();
WorkItemInfo workItemInfo = null;
if (this.workItems != null) {
workItemInfo = this.workItems.get(id);
context.merge(workItemInfo);
}
if (workItemInfo == null) {
workItemInfo = context.findWorkItemInfo( id );
}