[jboss-user] [JBoss jBPM] - Problem in getting proper workflow transitions:

maxp do-not-reply at jboss.com
Tue Jun 5 00:09:46 EDT 2007


Hi everyone, 

I am a new user to jbpm and i am stuck in getting a problem resolved. I would appreciate any help on the same.

I basically wanted to a process to wait at a task-node for user input and then move to next state on signal.

So I created a process definition which has the following states
1.) start
2) task-node1
3) task-node2
4) task-node3
5)end

Now if i execute the following code in a servlet

ProcessInstance processInstance1 = new ProcessInstance(processDefinition2);

      Token token2 = processInstance1.getRootToken();
print(token2.getNode().getName());
      token2.signal();
print(token2.getNode().getName());
      token2.signal();

print(token2.getNode().getName());
      token2.signal();
print(token2.getNode().getName());
      token2.signal();

It prints,  start, task-node1, task-node2, task-node3

But say 
after 

      Token token2 = processInstance1.getRootToken();
print(token2.getNode().getName());
      token2.signal();
print(token2.getNode().getName());

i save the process instance, with the token

now i again reload the process insatnce with its id in a seperate servlet and execute the following code

print(token2.getNode().getName());
      Token token2 = processInstance1.getRootToken();
print(token2.getNode().getName());

i get 
task-node1 
end

shouldn't the state be changed to task-node2 ????

Anyone  faced similar problem. If you would like me to try something , do let me know. 

- Max


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051161#4051161

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051161



More information about the jboss-user mailing list