code: @Transactional
  	public ProcessInstance mergeProcessInstance(ProcessInstance processInstance) {
  		log.debug("mergeProcessInstance");
  		ProcessInstance ret =  m_entityManager.merge(processInstance);
  		m_entityManager.flush();
  		if (log.isDebugEnabled()) {
  			log.debug("updating processInstance {} to {}",processInstance.getId(),processInstance.getStatus());
  		}
  		return ret;
  	}
docs: /* (non-Javadoc)
  @see nz.co.senanque.workflow.WorkflowDAO#mergeProcessInstance(nz.co.senanque.workflow.instances.ProcessInstance)