Search in sources :

Example 1 with Results

use of org.kie.dmn.core.compiler.alphanetbased.Results in project drools by kiegroup.

the class DMNAlphaNetworkTemplate method evaluate.

@Override
public Object evaluate(EvaluationContext evaluationContext, DecisionTable decisionTable) {
    // Clean previous results
    Results results = alphaNetworkEvaluationContext.getResultCollector();
    results.clearResults();
    // init CompiledNetwork with object needed for results,
    compiledNetwork.init(alphaNetworkEvaluationContext);
    // create lambda constraints and results
    compiledNetwork.initConstraintsResults();
    // Fire rete network
    compiledNetwork.propagateAssertObject(new DefaultFactHandle(getOrCreatePropertyEvaluator(evaluationContext)), null, null);
    // Find result with Hit Policy applied
    Object result = results.applyHitPolicy(evaluationContext, hitPolicy, decisionTable);
    return result;
}
Also used : DefaultFactHandle(org.drools.core.common.DefaultFactHandle) Results(org.kie.dmn.core.compiler.alphanetbased.Results) Override(java.lang.Override)

Aggregations

Override (java.lang.Override)1 DefaultFactHandle (org.drools.core.common.DefaultFactHandle)1 Results (org.kie.dmn.core.compiler.alphanetbased.Results)1