Search in sources :

Example 16 with DmnExpressionImpl

use of org.camunda.bpm.dmn.engine.impl.DmnExpressionImpl in project camunda-engine-dmn by camunda.

the class DecisionTableEvaluationHandler method evaluateInput.

protected DmnEvaluatedInput evaluateInput(DmnDecisionTableInputImpl input, VariableContext variableContext) {
    DmnEvaluatedInputImpl evaluatedInput = new DmnEvaluatedInputImpl(input);
    DmnExpressionImpl expression = input.getExpression();
    if (expression != null) {
        Object value = evaluateInputExpression(expression, variableContext);
        TypedValue typedValue = expression.getTypeDefinition().transform(value);
        evaluatedInput.setValue(typedValue);
    } else {
        evaluatedInput.setValue(Variables.untypedNullValue());
    }
    return evaluatedInput;
}
Also used : DmnExpressionImpl(org.camunda.bpm.dmn.engine.impl.DmnExpressionImpl) DmnEvaluatedInputImpl(org.camunda.bpm.dmn.engine.impl.delegate.DmnEvaluatedInputImpl) TypedValue(org.camunda.bpm.engine.variable.value.TypedValue)

Aggregations

DmnExpressionImpl (org.camunda.bpm.dmn.engine.impl.DmnExpressionImpl)16 Test (org.junit.Test)6 DmnDecisionTableInputImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableInputImpl)4 DmnEngineTest (org.camunda.bpm.dmn.engine.test.DmnEngineTest)4 DmnDecisionLiteralExpressionImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionLiteralExpressionImpl)3 DmnDecisionTableImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableImpl)3 DmnDecisionTableRuleImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableRuleImpl)3 DmnVariableImpl (org.camunda.bpm.dmn.engine.impl.DmnVariableImpl)3 TypedValue (org.camunda.bpm.engine.variable.value.TypedValue)3 DmnDecisionImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionImpl)2 DmnDecisionTableOutputImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableOutputImpl)2 InOrder (org.mockito.InOrder)2 ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 CompiledScript (javax.script.CompiledScript)1 DmnDecision (org.camunda.bpm.dmn.engine.DmnDecision)1 DmnEvaluatedOutput (org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedOutput)1 DmnDecisionLiteralExpressionEvaluationEventImpl (org.camunda.bpm.dmn.engine.impl.delegate.DmnDecisionLiteralExpressionEvaluationEventImpl)1 DmnEvaluatedInputImpl (org.camunda.bpm.dmn.engine.impl.delegate.DmnEvaluatedInputImpl)1 DmnEvaluatedOutputImpl (org.camunda.bpm.dmn.engine.impl.delegate.DmnEvaluatedOutputImpl)1