Hi !
I had localized this problem. The class org.jbpm.pvm.internal.script.EnvironmentBindings doesn`t store locale variables from script:
public Object put(String key, Object value) {
return null;
}
Groovy engine ignores it and stores local variables in its own storage.
Jython engine obeys the limitations of Bindings, so it can`t store local variables if Bindings doesn`t allow it!!!!!
If is it desireable behaviour ?
Possible solution is adding local storage to EnvironmentBindings and to allow putting values in it.
Such as :
private HashMap<String, Object> locals = new HashMap<String, Object>();
public Object put(String key, Object value) {
return null;
}
public Object get(Object key) {
if (locals.containsKey((String)key))
return locals.get((String)key);
else
return environment.get((String)key);
}
What do you think about this?
Thanks a lot, Andrew