taskInstance已经end了,可是待办任务列表里还是有
gululuzixiao1631
2012-07-27
这是审核方法 public ActionForward approve(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { int leaveId = Integer.parseInt(request.getParameter("leaveId")); int taskInstanceId = Integer.parseInt(request .getParameter("taskInstanceId")); JbpmContext context = JbpmConfiguration.getInstance() .createJbpmContext(); // 加载请假条 Leave leave = (Leave) context.getSession().load(Leave.class, leaveId); ProcessInstance processInstance = context.getProcessInstance(leave .getProcessInstanceId()); TaskMgmtSession taskMgmtSession = context.getTaskMgmtSession(); TaskInstance taskInstance = taskMgmtSession .loadTaskInstance(taskInstanceId); if (taskInstance.getStart() == null) { // 没开始的话则开始,即向start开始时间字段填入数据 taskInstance.start("manager2"); } taskInstance.end(); // 触发流程往下走 // processInstance.getRootToken().signal(); // 当前结点名称 System.out.println(processInstance.getRootToken().getNode().getName()); response.sendRedirect("manager.do?method=viewTasks"); return null; } 采用的是否泳道,我发现当我执行完这个方法时,数据库的taskInstance表并没有变化,start,end字段都没有值。。。 大家看看是怎么回事啊 |