This is something which i understood from R&D.
A Token is an object that represents an execution (http://docs.jboss.org/jbpm/v3/userguide/graphorientedprogramming.html#anexecution).
When the process is getting executed a token will have different nodes depending upon its flow of execution, it can have receive, invoke or assign or anything else. And it holds onto the last node that it executed if the process is not ended. When a process ends, its tokens also ends.
So when you do
you will always get the last node it executed. In your case its coming as invoke action since that was the last node which executed and the process has not ended properly.
So I think this might not be a bug. Not sure 100%.
Hope this helps.
That is my understanding as well. Thanks for confirming it though.
However I think there is still a bug because the code in IntegrationControl is expecting to find only ReceiveActions however under this 'bad state' scenario, it also finds InvokeAction as the query does not tell Hibernate to find only ReceiveActions.
Btw, we are using JBPM 3.2 with BPEL 1.1 GA on JBoss 4.0.5GA and Hibernate 3.2 GA.
Yea. In findReceiveTokens API, it may still be a bug, since its returning all the tokens.
I am using JBPM 3.2 with BPEL 1.1.1 on JBoss 4.2.0GA and Hibernate 3.2 GA.
Btw how did you change the query ?