2 Replies Latest reply on Sep 27, 2012 11:37 PM by Jack G

    How to back to previous node from current user task node

    Jack G Newbie

      I'm using jBPM5.3 now. I use JPA to persist KnowledgeSession infomation.I use my custome WorkItemHandler to replace the default MinaHTWorkItemHandler or WSHumanTaskHandler for user task node.My custom WorkItemHandler code as below:

       

      
      public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
      
      
      
      
      DefaultTask task=new DefaultTask();
      
      
      
      
      task.setNodeInstanceId(this.getNodeInstance(workItem).getId());
      
      
      
      
      task.setWorkItemId(workItem.getId());
      
      
      
      
      task.setName(workItem.getName());
      
      
      
      
      
      
      
      
      task.setOwner((String)workItem.getParameter("ActorId"));
      
      
      
      
      task.setCmnt((String)workItem.getParameter("Comment"));
      
      
      
      
      task.setState(TaskState.created);
      
      
      
      
      task.setCreate(new Date());
      
      
      
      
      task.setProcessInstanceId(workItem.getProcessInstanceId());
      
      
      
      
      task.setSessionId(this.getSession().getId());
      
      
      
      
      this.getNodeInstance(workItem);
      
      
      
      
      taskManager.addTask(task);//persistent task info to db
      
      
      }
      
      
      

       

      Now,I want to back to previous node from current user task node with programming type,non modeling type.Thanks.