// if process still in session stop the process and delete the attribute, otherwise it could have been finished
if(o!=null){
CommonjWorkContainer container=(CommonjWorkContainer)o;
FooRemoteWorkItem fooRwi=container.getFooRemoteWorkItem();
// release the resource
fooRwi.release();
// Use it to give time to set the status
Thread.sleep(1000);
statusWI=container.getWorkItem().getStatus();
//session.removeAttribute("SBI_PROCESS_"+document_id);
processesStatusContainer.getPidContainerMap().remove(pid);