use of org.camunda.bpm.dmn.engine.impl.delegate.DmnEvaluatedOutputImpl in project camunda-engine-dmn by camunda.
the class DecisionTableEvaluationHandler method evaluateOutputEntries.
protected Map<String, DmnEvaluatedOutput> evaluateOutputEntries(List<DmnDecisionTableOutputImpl> decisionTableOutputs, DmnDecisionTableRuleImpl matchingRule, VariableContext variableContext) {
Map<String, DmnEvaluatedOutput> outputEntries = new LinkedHashMap<String, DmnEvaluatedOutput>();
for (int outputIdx = 0; outputIdx < decisionTableOutputs.size(); outputIdx++) {
// evaluate output entry, skip empty expressions
DmnExpressionImpl conclusion = matchingRule.getConclusions().get(outputIdx);
if (isNonEmptyExpression(conclusion)) {
Object value = evaluateOutputEntry(conclusion, variableContext);
// transform to output type
DmnDecisionTableOutputImpl decisionTableOutput = decisionTableOutputs.get(outputIdx);
TypedValue typedValue = decisionTableOutput.getTypeDefinition().transform(value);
// set on result
DmnEvaluatedOutputImpl evaluatedOutput = new DmnEvaluatedOutputImpl(decisionTableOutput, typedValue);
outputEntries.put(decisionTableOutput.getOutputName(), evaluatedOutput);
}
}
return outputEntries;
}
Aggregations