[jboss-user] [JBoss jBPM] - Re: Confused about variable and token association

clandestino_bgd do-not-reply at jboss.com
Tue May 22 11:34:48 EDT 2007


Dear community,
Since I have used several hours trying to understand why my invocation of:

void ContextInstance.setVariable(String variableName, Object value, Token token);

does not set variable in token scope, but in process scope instead of that.
it seemed to me logical that it will be created in token scope if it does not exist.

But it WON'T and people should be careful.

User Guide indeed says:
anonymous wrote : 
  | When a non-existing variable is set on a token, the variable is created on the root-token. This means that each variable has by default process scope. To make a variable token-local, you have to create it explicitly with:
  | 
  | ContextInstance.createVariable(String name, Object value, Token token);
  | 

Regards
Milan

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

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



More information about the jboss-user mailing list