Skip to content

Commit

Permalink
fix resolvable in certain cases
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed May 27, 2024
1 parent 1f7815d commit 6d4c90b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ public boolean isVariableResolvable(String variableId) {
return true;
}

ContextResolver resolver = (ContextResolver) getNodeInstance();
if (resolver == null) {
return false;
KogitoNodeInstance nodeInstance = getNodeInstance();
if (nodeInstance instanceof ContextResolver) {
ContextResolver resolver = (ContextResolver) nodeInstance;
return resolver.resolveContext(VariableScope.VARIABLE_SCOPE, variableId) != null;
}
return resolver.resolveContext(VariableScope.VARIABLE_SCOPE, variableId) != null;

return nodeInstance.getVariable(variableId) != null;
}

@Override
Expand Down

0 comments on commit 6d4c90b

Please sign in to comment.