cancel
Showing results for 
Search instead for 
Did you mean: 

VariableScope#getVariables

etienne
Champ in-the-making
Champ in-the-making
Hi

I've gone through the implementation of org.activiti.engine.delegate.VariableScope#getVariables and the following question came up: if the same name is used for a variable on different scopes in the scope hierarchy, why does the variable furthest up the tree have precedence? Intuitively, I would have imagined that a more 'local' scope has precedence.

This is the code I mean:

for (VariableInstanceEntity variableInstance: variableInstances.values()) {
      variables.put(variableInstance.getName(), variableInstance.getValue());
}
VariableScopeImpl parentScope = getParentVariableScope();
if (parentScope!=null) {
      return parentScope.collectVariables(variables);
}

Thanks for sharing the thoughts behind this implementation 'strategy'.
Regards, Etienne
2 REPLIES 2

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Etienne,

Can you please use the userforum for questions like this?

etienne
Champ in-the-making
Champ in-the-making
Hi Ronald

Ok. Will do.

Thanks and regards, Etienne
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.