public void auditByBusinessId(Opinion opinion) { Task e = (Task) sessionFactory .openSession() .createQuery( "select t from org.jbpm.pvm.internal.task.TaskImpl t,ExecutionImpl e where e.key=:key and t.processInstance=e.processInstance") .setParameter("key", opinion.getBusinessId()) .uniqueResult(); opinion.setTaskId(e.getId()); opinion.setTaskName(e.getName()); audit(opinion); }
public void audit(Opinion opinion) { Map varis = new HashMap(); varis.put(opinion.getKey(), opinion.getResult()); sessionFactory.getCurrentSession().save(opinion); next(opinion.getUserId(), opinion.getTaskId(), varis); }