From b7378207212b767322a307335e326bda1cab99b9 Mon Sep 17 00:00:00 2001 From: Mariusz Kumor Date: Tue, 8 Jan 2019 18:14:32 +0100 Subject: [PATCH] Added a support for a default alias of the entry name in the input scope. Resolved #130 --- .../evaluator/entry/InputEntryEvaluator.java | 2 +- .../evaluator/entry/OutputEntryEvaluator.java | 4 +- .../ExpressionEvaluationProvider.java | 4 +- .../FeelExpressionEvaluationProvider.java | 6 +-- .../JuelExpressionEvaluationProvider.java | 6 +-- .../LiteralExpressionEvaluationProvider.java | 8 ++-- .../ScriptExpressionEvaluationProvider.java | 18 ++++++-- .../bindings/ContextVariablesBindings.java | 16 ++++++- .../model/decision/rule/entry/Entry.java | 42 +++++++++++++++++++ .../model/decision/rule/entry/InputEntry.java | 9 ++-- .../decision/rule/entry/OutputEntry.java | 10 ++--- ...ovyExpressionEvaluationProviderSpec.groovy | 8 +++- ...iptExpressionEvaluationProviderSpec.groovy | 9 +++- ...ralExpressionEvaluationProviderSpec.groovy | 4 +- .../model/decision/DecisionUtilSpec.groovy | 2 +- 15 files changed, 112 insertions(+), 36 deletions(-) create mode 100644 src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/Entry.java diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/entry/InputEntryEvaluator.java b/src/main/java/org/powerflows/dmn/engine/evaluator/entry/InputEntryEvaluator.java index 701c01a..cbca67f 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/entry/InputEntryEvaluator.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/entry/InputEntryEvaluator.java @@ -66,7 +66,7 @@ public boolean evaluate(final InputEntry inputEntry, final Object inputValue = evaluationContext.get(inputEntry.getName()); final SpecifiedTypeValue typedInputValue = typeConverter.convert(inputValue); - final Object inputEntryValue = inputEntryExpressionEvaluator.evaluateEntry(inputEntry.getExpression(), evaluationContext); + final Object inputEntryValue = inputEntryExpressionEvaluator.evaluateEntry(inputEntry, evaluationContext); final SpecifiedTypeValue typedInputEntryValue; if (isBoolean(inputEntryValue)) { diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/entry/OutputEntryEvaluator.java b/src/main/java/org/powerflows/dmn/engine/evaluator/entry/OutputEntryEvaluator.java index 1773e86..03cd063 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/entry/OutputEntryEvaluator.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/entry/OutputEntryEvaluator.java @@ -19,8 +19,8 @@ import lombok.extern.slf4j.Slf4j; import org.powerflows.dmn.engine.evaluator.context.EvaluationContext; -import org.powerflows.dmn.engine.evaluator.expression.provider.ExpressionEvaluationProviderFactory; import org.powerflows.dmn.engine.evaluator.expression.provider.ExpressionEvaluationProvider; +import org.powerflows.dmn.engine.evaluator.expression.provider.ExpressionEvaluationProviderFactory; import org.powerflows.dmn.engine.evaluator.type.converter.TypeConverter; import org.powerflows.dmn.engine.evaluator.type.converter.TypeConverterFactory; import org.powerflows.dmn.engine.model.decision.field.Output; @@ -45,7 +45,7 @@ public EntryResult evaluate(final OutputEntry outputEntry, final Output output, final ExpressionEvaluationProvider expressionEvaluator = expressionEvaluationProviderFactory.getInstance(outputEntry.getExpression().getType()); final TypeConverter typeConverter = typeConverterFactory.getInstance(output.getType()); - final Serializable outputEntryValue = expressionEvaluator.evaluateEntry(outputEntry.getExpression(), evaluationContext); + final Serializable outputEntryValue = expressionEvaluator.evaluateEntry(outputEntry, evaluationContext); //Needed for the output entry value validation. //Correct build means the output entry value has a type compatible with the output definition. diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ExpressionEvaluationProvider.java b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ExpressionEvaluationProvider.java index 8308e54..e3ddadc 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ExpressionEvaluationProvider.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ExpressionEvaluationProvider.java @@ -17,8 +17,8 @@ package org.powerflows.dmn.engine.evaluator.expression.provider; import org.powerflows.dmn.engine.evaluator.context.EvaluationContext; -import org.powerflows.dmn.engine.model.decision.expression.Expression; import org.powerflows.dmn.engine.model.decision.field.Input; +import org.powerflows.dmn.engine.model.decision.rule.entry.Entry; import java.io.Serializable; @@ -26,5 +26,5 @@ public interface ExpressionEvaluationProvider { Serializable evaluateInput(Input input, EvaluationContext evaluationContext); - Serializable evaluateEntry(Expression entryExpression, EvaluationContext evaluationContext); + Serializable evaluateEntry(Entry entry, EvaluationContext evaluationContext); } diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/FeelExpressionEvaluationProvider.java b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/FeelExpressionEvaluationProvider.java index d0a2373..9b18e23 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/FeelExpressionEvaluationProvider.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/FeelExpressionEvaluationProvider.java @@ -17,20 +17,20 @@ package org.powerflows.dmn.engine.evaluator.expression.provider; import org.powerflows.dmn.engine.evaluator.context.EvaluationContext; -import org.powerflows.dmn.engine.model.decision.expression.Expression; import org.powerflows.dmn.engine.model.decision.field.Input; +import org.powerflows.dmn.engine.model.decision.rule.entry.Entry; import java.io.Serializable; class FeelExpressionEvaluationProvider implements ExpressionEvaluationProvider { @Override - public Serializable evaluateEntry(final Expression expression, final EvaluationContext evaluationContext) { + public Serializable evaluateInput(final Input input, final EvaluationContext evaluationContext) { throw new UnsupportedOperationException(); } @Override - public Serializable evaluateInput(final Input input, final EvaluationContext evaluationContext) { + public Serializable evaluateEntry(final Entry entry, final EvaluationContext evaluationContext) { throw new UnsupportedOperationException(); } } diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/JuelExpressionEvaluationProvider.java b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/JuelExpressionEvaluationProvider.java index e46437c..a237d92 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/JuelExpressionEvaluationProvider.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/JuelExpressionEvaluationProvider.java @@ -17,20 +17,20 @@ package org.powerflows.dmn.engine.evaluator.expression.provider; import org.powerflows.dmn.engine.evaluator.context.EvaluationContext; -import org.powerflows.dmn.engine.model.decision.expression.Expression; import org.powerflows.dmn.engine.model.decision.field.Input; +import org.powerflows.dmn.engine.model.decision.rule.entry.Entry; import java.io.Serializable; class JuelExpressionEvaluationProvider implements ExpressionEvaluationProvider { @Override - public Serializable evaluateEntry(final Expression expression, final EvaluationContext evaluationContext) { + public Serializable evaluateInput(final Input input, final EvaluationContext evaluationContext) { throw new UnsupportedOperationException(); } @Override - public Serializable evaluateInput(final Input input, final EvaluationContext evaluationContext) { + public Serializable evaluateEntry(final Entry entry, final EvaluationContext evaluationContext) { throw new UnsupportedOperationException(); } } diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProvider.java b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProvider.java index ec59a76..4dc8008 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProvider.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProvider.java @@ -18,8 +18,8 @@ import lombok.extern.slf4j.Slf4j; import org.powerflows.dmn.engine.evaluator.context.EvaluationContext; -import org.powerflows.dmn.engine.model.decision.expression.Expression; import org.powerflows.dmn.engine.model.decision.field.Input; +import org.powerflows.dmn.engine.model.decision.rule.entry.Entry; import java.io.Serializable; @@ -43,10 +43,10 @@ public Serializable evaluateInput(final Input input, final EvaluationContext eva } @Override - public Serializable evaluateEntry(final Expression entryExpression, final EvaluationContext evaluationContext) { - log.debug("Starting evaluation of entry with expression: {} and evaluation context: {}", entryExpression, evaluationContext); + public Serializable evaluateEntry(final Entry entry, final EvaluationContext evaluationContext) { + log.debug("Starting evaluation of entry {} with evaluation context: {}", entry, evaluationContext); - final Serializable result = entryExpression.getValue(); + final Serializable result = entry.getExpression().getValue(); log.debug("Evaluated entry result: {}", result); diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ScriptExpressionEvaluationProvider.java b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ScriptExpressionEvaluationProvider.java index 55d9774..3e49757 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ScriptExpressionEvaluationProvider.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/provider/ScriptExpressionEvaluationProvider.java @@ -23,6 +23,7 @@ import org.powerflows.dmn.engine.evaluator.expression.script.bindings.ContextVariablesBindings; import org.powerflows.dmn.engine.model.decision.expression.Expression; import org.powerflows.dmn.engine.model.decision.field.Input; +import org.powerflows.dmn.engine.model.decision.rule.entry.Entry; import javax.script.Bindings; import javax.script.ScriptEngine; @@ -51,20 +52,31 @@ public Serializable evaluateInput(final Input input, final EvaluationContext eva } @Override - public Serializable evaluateEntry(final Expression entryExpression, final EvaluationContext evaluationContext) { - log.debug("Starting evaluation of entry with expression: {} and evaluation context: {}", entryExpression, evaluationContext); + public Serializable evaluateEntry(final Entry entry, final EvaluationContext evaluationContext) { + log.debug("Starting evaluation of entry {} with evaluation context: {}", entry, evaluationContext); - final Serializable result = evaluate(entryExpression, evaluationContext); + final Serializable result = evaluate(entry, evaluationContext); log.debug("Evaluated entry result: {}", result); return result; } + private Serializable evaluate(final Entry entry, final EvaluationContext evaluationContext) { + final ScriptEngine scriptEngine = scriptEngineProvider.getScriptEngine(entry.getExpression().getType()); + final Bindings bindings = ContextVariablesBindings.create(scriptEngine.createBindings(), evaluationContext, entry.getName()); + + return evaluate(entry.getExpression(), scriptEngine, bindings); + } + private Serializable evaluate(final Expression expression, final EvaluationContext evaluationContext) { final ScriptEngine scriptEngine = scriptEngineProvider.getScriptEngine(expression.getType()); final Bindings bindings = ContextVariablesBindings.create(scriptEngine.createBindings(), evaluationContext); + return evaluate(expression, scriptEngine, bindings); + } + + private Serializable evaluate(final Expression expression, final ScriptEngine scriptEngine, final Bindings bindings) { final Serializable result; try { diff --git a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/script/bindings/ContextVariablesBindings.java b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/script/bindings/ContextVariablesBindings.java index 2c50095..d628024 100644 --- a/src/main/java/org/powerflows/dmn/engine/evaluator/expression/script/bindings/ContextVariablesBindings.java +++ b/src/main/java/org/powerflows/dmn/engine/evaluator/expression/script/bindings/ContextVariablesBindings.java @@ -26,6 +26,7 @@ public class ContextVariablesBindings implements Bindings { private final Bindings bindings; + private final static String DEFAULT_INPUT_NAME_ALIAS = "cellInput"; private ContextVariablesBindings(final Bindings bindings, final EvaluationContext evaluationContext) { this.bindings = bindings; @@ -36,10 +37,23 @@ private ContextVariablesBindings(final Bindings bindings, final EvaluationContex .forEach(variableName -> this.bindings.put(variableName, evaluationContext.get(variableName))); } - public static ContextVariablesBindings create(final Bindings bindings, final EvaluationContext evaluationContext) { + private ContextVariablesBindings(final Bindings bindings, final EvaluationContext evaluationContext, final String inputName) { + this(bindings, evaluationContext); + + this.bindings.put(DEFAULT_INPUT_NAME_ALIAS, evaluationContext.get(inputName)); + } + + public static ContextVariablesBindings create(final Bindings bindings, + final EvaluationContext evaluationContext) { return new ContextVariablesBindings(bindings, evaluationContext); } + public static ContextVariablesBindings create(final Bindings bindings, + final EvaluationContext evaluationContext, + final String inputName) { + return new ContextVariablesBindings(bindings, evaluationContext, inputName); + } + @Override public Object put(final String name, final Object value) { return bindings.put(name, value); diff --git a/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/Entry.java b/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/Entry.java new file mode 100644 index 0000000..21f6c12 --- /dev/null +++ b/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/Entry.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2018-present PowerFlows.org - all rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.powerflows.dmn.engine.model.decision.rule.entry; + +import lombok.ToString; +import org.powerflows.dmn.engine.model.decision.expression.Expression; + +import java.io.Serializable; + +@ToString +public class Entry implements Serializable { + + protected String name; + protected Expression expression; + + Entry() { + } + + public String getName() { + return name; + } + + public Expression getExpression() { + return expression; + } + + +} \ No newline at end of file diff --git a/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/InputEntry.java b/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/InputEntry.java index ed9cc7b..3151587 100644 --- a/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/InputEntry.java +++ b/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/InputEntry.java @@ -27,17 +27,16 @@ import java.util.function.Consumer; import java.util.function.Function; -@EqualsAndHashCode -@ToString -public class InputEntry implements Serializable { +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class InputEntry extends Entry { private static final long serialVersionUID = 1; - private String name; - private Expression expression; private EvaluationMode evaluationMode; private InputEntry() { + super(); } public String getName() { diff --git a/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/OutputEntry.java b/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/OutputEntry.java index 4146afe..d8c45df 100644 --- a/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/OutputEntry.java +++ b/src/main/java/org/powerflows/dmn/engine/model/decision/rule/entry/OutputEntry.java @@ -26,16 +26,14 @@ import java.util.function.Consumer; import java.util.function.Function; -@EqualsAndHashCode -@ToString -public class OutputEntry implements Serializable { +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class OutputEntry extends Entry { private static final long serialVersionUID = 1; - private String name; - private Expression expression; - private OutputEntry() { + super(); } public String getName() { diff --git a/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/GroovyExpressionEvaluationProviderSpec.groovy b/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/GroovyExpressionEvaluationProviderSpec.groovy index 43bb683..cdf7668 100644 --- a/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/GroovyExpressionEvaluationProviderSpec.groovy +++ b/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/GroovyExpressionEvaluationProviderSpec.groovy @@ -23,6 +23,8 @@ import org.powerflows.dmn.engine.evaluator.expression.script.ScriptEngineProvide import org.powerflows.dmn.engine.model.decision.expression.Expression import org.powerflows.dmn.engine.model.decision.expression.ExpressionType import org.powerflows.dmn.engine.model.decision.field.Input +import org.powerflows.dmn.engine.model.decision.rule.entry.InputEntry +import org.powerflows.dmn.engine.model.decision.rule.entry.OutputEntry import org.powerflows.dmn.engine.model.evaluation.variable.DecisionVariables import spock.lang.Specification import spock.lang.Unroll @@ -40,12 +42,13 @@ class GroovyExpressionEvaluationProviderSpec extends Specification { final Object entryExpressionValue, final Object contextVariable, final boolean expectedEntryResult) { given: final Expression entryExpression = [value: entryExpressionValue, type: ExpressionType.GROOVY] + final InputEntry inputEntry = [expression: entryExpression] as InputEntry final DecisionVariables decisionVariables = new DecisionVariables([x: contextVariable, TestInputName: true]) final EvaluationContext evaluationContext = new EvaluationContext(decisionVariables) when: - final boolean inputEntryResult = expressionEvaluationProvider.evaluateEntry(entryExpression, evaluationContext) + final boolean inputEntryResult = expressionEvaluationProvider.evaluateEntry(inputEntry, evaluationContext) then: inputEntryResult == expectedEntryResult @@ -88,9 +91,10 @@ class GroovyExpressionEvaluationProviderSpec extends Specification { final Expression entryExpression = [value: outputEntryValue, type: ExpressionType.GROOVY] final DecisionVariables decisionVariables = new DecisionVariables([:]) final EvaluationContext contextVariables = new EvaluationContext(decisionVariables) + final OutputEntry outputEntry = [expression: entryExpression] as OutputEntry when: - expressionEvaluationProvider.evaluateEntry(entryExpression, contextVariables) + expressionEvaluationProvider.evaluateEntry(outputEntry, contextVariables) then: final EvaluationException exception = thrown() diff --git a/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/JavaScriptExpressionEvaluationProviderSpec.groovy b/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/JavaScriptExpressionEvaluationProviderSpec.groovy index 0f07f9a..d06b2c9 100644 --- a/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/JavaScriptExpressionEvaluationProviderSpec.groovy +++ b/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/JavaScriptExpressionEvaluationProviderSpec.groovy @@ -23,6 +23,8 @@ import org.powerflows.dmn.engine.evaluator.expression.script.ScriptEngineProvide import org.powerflows.dmn.engine.model.decision.expression.Expression import org.powerflows.dmn.engine.model.decision.expression.ExpressionType import org.powerflows.dmn.engine.model.decision.field.Input +import org.powerflows.dmn.engine.model.decision.rule.entry.InputEntry +import org.powerflows.dmn.engine.model.decision.rule.entry.OutputEntry import org.powerflows.dmn.engine.model.evaluation.variable.DecisionVariables import spock.lang.Specification import spock.lang.Unroll @@ -40,12 +42,13 @@ class JavaScriptExpressionEvaluationProviderSpec extends Specification { final Object entryExpressionValue, final Object contextVariable, final boolean expectedEntryResult) { given: final Expression entryExpression = [value: entryExpressionValue, type: ExpressionType.JAVASCRIPT] + final InputEntry inputEntry = [expression: entryExpression] as InputEntry final DecisionVariables decisionVariables = new DecisionVariables([x: contextVariable, TestInputName: true]) final EvaluationContext evaluationContext = new EvaluationContext(decisionVariables) when: - final boolean inputEntryResult = expressionEvaluationProvider.evaluateEntry(entryExpression, evaluationContext) + final boolean inputEntryResult = expressionEvaluationProvider.evaluateEntry(inputEntry, evaluationContext) then: inputEntryResult == expectedEntryResult @@ -86,11 +89,13 @@ class JavaScriptExpressionEvaluationProviderSpec extends Specification { given: final String outputEntryValue = 'x' final Expression entryExpression = [value: outputEntryValue, type: ExpressionType.JAVASCRIPT] + final OutputEntry outputEntry = [expression: entryExpression] as OutputEntry + final DecisionVariables decisionVariables = new DecisionVariables([:]) final EvaluationContext contextVariables = new EvaluationContext(decisionVariables) when: - expressionEvaluationProvider.evaluateEntry(entryExpression, contextVariables) + expressionEvaluationProvider.evaluateEntry(outputEntry, contextVariables) then: final EvaluationException exception = thrown() diff --git a/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProviderSpec.groovy b/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProviderSpec.groovy index 3311543..f9309fa 100644 --- a/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProviderSpec.groovy +++ b/src/test/groovy/org/powerflows/dmn/engine/evaluator/expression/provider/LiteralExpressionEvaluationProviderSpec.groovy @@ -20,6 +20,7 @@ import org.powerflows.dmn.engine.evaluator.context.EvaluationContext import org.powerflows.dmn.engine.model.decision.expression.Expression import org.powerflows.dmn.engine.model.decision.expression.ExpressionType import org.powerflows.dmn.engine.model.decision.field.Input +import org.powerflows.dmn.engine.model.decision.rule.entry.InputEntry import org.powerflows.dmn.engine.model.evaluation.variable.DecisionVariables import spock.lang.Specification @@ -33,12 +34,13 @@ class LiteralExpressionEvaluationProviderSpec extends Specification { final Object inputEntryValue = 5 final Object contextVariable = 6 final Expression entryExpression = [value: inputEntryValue, type: ExpressionType.LITERAL] + final InputEntry inputEntry = [expression: entryExpression] as InputEntry final DecisionVariables decisionVariables = new DecisionVariables([TestInputName: contextVariable]) final EvaluationContext evaluationContext = new EvaluationContext(decisionVariables) when: - final boolean inputEntryResult = expressionEvaluationProvider.evaluateEntry(entryExpression, evaluationContext) + final boolean inputEntryResult = expressionEvaluationProvider.evaluateEntry(inputEntry, evaluationContext) then: inputEntryResult diff --git a/src/test/groovy/org/powerflows/dmn/engine/model/decision/DecisionUtilSpec.groovy b/src/test/groovy/org/powerflows/dmn/engine/model/decision/DecisionUtilSpec.groovy index cc217ac..68176e3 100644 --- a/src/test/groovy/org/powerflows/dmn/engine/model/decision/DecisionUtilSpec.groovy +++ b/src/test/groovy/org/powerflows/dmn/engine/model/decision/DecisionUtilSpec.groovy @@ -93,7 +93,7 @@ class DecisionUtilSpec extends Specification { then: final DecisionBuildException exception = thrown() exception != null - exception.getMessage() == 'Can not set value 5 for InputEntry(name=null, expression=null, evaluationMode=null)' + exception.getMessage() == 'Can not set value 5 for InputEntry(super=Entry(name=null, expression=null), evaluationMode=null)' } void 'should throw exception when can not find field by type'() {