[jboss-user] [JBoss jBPM] - Re: Identifying tokens

twiceknightly do-not-reply at jboss.com
Wed Apr 23 10:46:15 EDT 2008

"salaboy21" wrote : can you explain a little more what are you trying to achive?
  | because you can get the token with
  | processInstance.getRootToken()
  | and then .signal()...

Yes I am using that to signal the root token but I am thinking now what if I need to signal another token.  How do I know which one to signal.

I want to retrieve exactly where I am in a overall process at any one time i.e. which nodes I am at in all execution threads of the process.  I am currently performing something like this

  | Token token = processInstance.getRootToken()
  | String nodeName = token.getNode().getName() ;

Obviously though this is only any good if there is only one route through the process.  I would like to return a list of tokens and the associated node name they are currently at.

The reason I am doing this is as follows.  I have a client/server setup.  The server component is an EJB wrapping the jbpm in a command pattern.
So for example the client would send a SignalProcessDTO holding the transition name, processInstanceId etc to the server.  The server will detect the type of payload and run a signal process command.  The signal process command will use the info in the DTO to get the process instance and then perform the signal.

I am delivering an adapter jar to the client (a web app).  The adapter makes the interface to the server simple.  Through the adapter the client is exposed to a very simple API.  Essentially it allows them to say one of two things
- Can I make this transition.
- Perform this transition.

.  Hence the reason I want to pull back the list of tokens, to determine which "actions" in my adapter can be performed given the currrent state of the process.

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

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

More information about the jboss-user mailing list