are you sure .getLeavingTransition("refusee") returns the correct one?
maybe cou could try this
| 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);
| taskInstance =jbpmContext.getTaskInstance(taskInstance.getID());
| 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=4233518#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...