Hi All,
In my workflow, i have to save some variables before ending a task. For this i use:
| taskInstance.setVariable("var1",value);
| taskInstance.end();
| jbpmcontext.save(taskInstance);
| jbpmContext.close();
|
the problem i am facing is that as soon as taskInstance.end() is encountered, the control
moves to the next node in the workflow, which is a decision node. the variable is not
committed at this stage, so the decision fails.
I tried closing the jbpmcontext after setVariable(), which persists the variable. But
again, as soon as taskInstance.end() is encountered, it moves to the next node, so the
current task keeps shoeing END_ as null. I am confused whther this is an expected
behaviour or am i doing some mistake.
the taskInstance i get as
| if (processId != null)
| {
| processInstance = jbpmContext.loadProcessInstance(processId.longValue());
| }
| if (processInstance != null)
| {
| TaskMgmtInstance tmi = processInstance.getTaskMgmtInstance();
| Collection taskInstances = tmi.getTaskInstances();
| //get all taskinstances for the selected processInstance
| for (Iterator itr = taskInstances.iterator(); itr.hasNext();)
| {
| task = (TaskInstance) itr.next();
| taskInstance = jbpmContext.getTaskInstanceForUpdate(task.getId());
| //get an updatable taskInstance.
| }
| }
|
|
thanks in advance...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081315#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...