From 6d4c90bc2889091b3cbce0d408788a63f63df197 Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Martinez Date: Thu, 23 May 2024 10:56:18 +0200 Subject: [PATCH] fix resolvable in certain cases --- .../process/instance/KogitoProcessContextImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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