[jboss-user] [JBoss jBPM] - Finding all tokens in ProcessDefinition?

jruud do-not-reply at jboss.com
Mon Dec 31 15:46:22 EST 2007


I would like to iterate through all the tokens in a ProcessDefinition (in order to print out the token.getId() for each node).  However, very likely because I don't understand how the jbpm engine code is supposed to work, I'm only getting the root token back, even when the diagram contains several forks etc. For example, I have tried running the code below on several known-to-be-good process definitions:

ProcessDefinition pd = ProcessDefinition.parseXmlString(xml);
ProcessInstance pi = new ProcessInstance(pd);

...but for example:
pi.findAllTokens() only returns the root token, and:
pi.getRootToken().getChildren() returns null

Any ideas?

Thanks, John

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

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



More information about the jboss-user mailing list