diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/KogitoProcessContextImpl.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/KogitoProcessContextImpl.java index 8a6ece75039..1b2bba1bda2 100755 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/KogitoProcessContextImpl.java +++ b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/KogitoProcessContextImpl.java @@ -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