Hum I'm encountering the same problem, but I can't make it work. Like you, I want to choose one transition among 2 existing. WHen I try this:
Transition tr=taskInstance.getTask().getTaskNode().getLeavingTransition("refusee"); I get the good transition. But when I do task.end(tr), it always takes the first transition (without any error). Here is the complete code: | JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); | try { | | processInstance = jbpmContext.loadProcessInstance(processInstanceId); | | TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession(); | @SuppressWarnings(value={"unchecked"}) //taskMgmtSession returns a raw List... We ignore the warning thrown by Java | List<TaskInstance> userTaskList = taskMgmtSession.findTaskInstances(demande.getValideur().getUsername()); | | for(int i = 0 ; i < userTaskList.size() ; i++) | { | TaskInstance taskInstance = userTaskList.get(i); | if(taskInstance.getProcessInstance().getId() == processInstanceId) | { | if(taskInstance.getName().equals("valider_demande")) | { | processInstance.getContextInstance().setVariable("demande", demande); | Transition tr=taskInstance.getTask().getTaskNode().getLeavingTransition("refusee"); | taskInstance.end(tr); | break; | } | } | } | | } | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233506#4233506 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233506 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user