use of org.camunda.bpm.dmn.engine.impl.delegate.DmnDecisionLiteralExpressionEvaluationEventImpl in project camunda-engine-dmn by camunda.
the class DecisionLiteralExpressionEvaluationHandler method evaluate.
@Override
public DmnDecisionLogicEvaluationEvent evaluate(DmnDecision decision, VariableContext variableContext) {
DmnDecisionLiteralExpressionEvaluationEventImpl evaluationResult = new DmnDecisionLiteralExpressionEvaluationEventImpl();
evaluationResult.setDecision(decision);
evaluationResult.setExecutedDecisionElements(1);
DmnDecisionLiteralExpressionImpl dmnDecisionLiteralExpression = (DmnDecisionLiteralExpressionImpl) decision.getDecisionLogic();
DmnVariableImpl variable = dmnDecisionLiteralExpression.getVariable();
DmnExpressionImpl expression = dmnDecisionLiteralExpression.getExpression();
Object evaluateExpression = evaluateLiteralExpression(expression, variableContext);
TypedValue typedValue = variable.getTypeDefinition().transform(evaluateExpression);
evaluationResult.setOutputValue(typedValue);
evaluationResult.setOutputName(variable.getName());
return evaluationResult;
}
Aggregations