Search in sources :

Example 6 with DmnDecisionTableOutputImpl

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

the class DefaultDmnTransform method transformDecisionTableOutput.

protected DmnDecisionTableOutputImpl transformDecisionTableOutput(Output output) {
    DmnElementTransformHandler<Output, DmnDecisionTableOutputImpl> handler = handlerRegistry.getHandler(Output.class);
    DmnDecisionTableOutputImpl dmnOutput = handler.handleElement(this, output);
    // validate output id
    if (dmnOutput.getId() == null) {
        throw LOG.decisionTableOutputIdIsMissing(decision, dmnOutput);
    }
    return dmnOutput;
}
Also used : DmnDecisionTableOutputImpl(org.camunda.bpm.dmn.engine.impl.DmnDecisionTableOutputImpl) Output(org.camunda.bpm.model.dmn.instance.Output)

Example 7 with DmnDecisionTableOutputImpl

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

the class DmnDecisionTableOutputTransformHandler method createFromOutput.

protected DmnDecisionTableOutputImpl createFromOutput(DmnElementTransformContext context, Output output) {
    DmnDecisionTableOutputImpl decisionTableOutput = createDmnElement(context, output);
    decisionTableOutput.setId(output.getId());
    decisionTableOutput.setName(output.getLabel());
    decisionTableOutput.setOutputName(output.getName());
    decisionTableOutput.setTypeDefinition(getTypeDefinition(context, output));
    return decisionTableOutput;
}
Also used : DmnDecisionTableOutputImpl(org.camunda.bpm.dmn.engine.impl.DmnDecisionTableOutputImpl)

Example 8 with DmnDecisionTableOutputImpl

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

the class DecisionTableEvaluationHandler method setEvaluationOutput.

protected void setEvaluationOutput(DmnDecisionTableImpl decisionTable, List<DmnDecisionTableRuleImpl> matchingRules, VariableContext variableContext, DmnDecisionTableEvaluationEventImpl evaluationResult) {
    List<DmnDecisionTableOutputImpl> decisionTableOutputs = decisionTable.getOutputs();
    List<DmnEvaluatedDecisionRule> evaluatedDecisionRules = new ArrayList<DmnEvaluatedDecisionRule>();
    for (DmnDecisionTableRuleImpl matchingRule : matchingRules) {
        DmnEvaluatedDecisionRule evaluatedRule = evaluateMatchingRule(decisionTableOutputs, matchingRule, variableContext);
        evaluatedDecisionRules.add(evaluatedRule);
    }
    evaluationResult.setMatchingRules(evaluatedDecisionRules);
}
Also used : DmnDecisionTableOutputImpl(org.camunda.bpm.dmn.engine.impl.DmnDecisionTableOutputImpl) ArrayList(java.util.ArrayList) DmnDecisionTableRuleImpl(org.camunda.bpm.dmn.engine.impl.DmnDecisionTableRuleImpl) DmnEvaluatedDecisionRule(org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedDecisionRule)

Aggregations

DmnDecisionTableOutputImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableOutputImpl)8 DmnDecisionTableRuleImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableRuleImpl)3 Output (org.camunda.bpm.model.dmn.instance.Output)3 ArrayList (java.util.ArrayList)2 DmnDecisionTableImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableImpl)2 DmnDecisionTableInputImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionTableInputImpl)2 DmnExpressionImpl (org.camunda.bpm.dmn.engine.impl.DmnExpressionImpl)2 DmnEngineTest (org.camunda.bpm.dmn.engine.test.DmnEngineTest)2 Rule (org.camunda.bpm.model.dmn.instance.Rule)2 Test (org.junit.Test)2 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 DmnEvaluatedDecisionRule (org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedDecisionRule)1 DmnEvaluatedOutput (org.camunda.bpm.dmn.engine.delegate.DmnEvaluatedOutput)1 DmnDecisionImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionImpl)1 DmnEvaluatedOutputImpl (org.camunda.bpm.dmn.engine.impl.delegate.DmnEvaluatedOutputImpl)1 DefaultTypeDefinition (org.camunda.bpm.dmn.engine.impl.type.DefaultTypeDefinition)1 TypedValue (org.camunda.bpm.engine.variable.value.TypedValue)1 DecisionTable (org.camunda.bpm.model.dmn.instance.DecisionTable)1 Input (org.camunda.bpm.model.dmn.instance.Input)1