Search in sources :

Example 6 with FEELFunction

use of org.kie.dmn.feel.runtime.FEELFunction in project drools by kiegroup.

the class DMNFEELHelper method evaluateFunctionDef.

public FEELFunction evaluateFunctionDef(DMNCompilerContext ctx, CompiledExpression expression, DMNModelImpl model, DMNElement element, Msg.Message errorMsg, Object... msgParams) {
    FEELFunction function = null;
    try {
        function = (FEELFunction) feel.evaluate(expression, Collections.emptyMap());
    } catch (Throwable t) {
        logger.error("Error evaluating function definition. Error will be reported in the model.", t);
    }
    processEvents(model, element, errorMsg, msgParams);
    return function;
}
Also used : FEELFunction(org.kie.dmn.feel.runtime.FEELFunction)

Aggregations

FEELFunction (org.kie.dmn.feel.runtime.FEELFunction)6 ArrayList (java.util.ArrayList)3 EvaluatorResult (org.kie.dmn.core.api.EvaluatorResult)3 List (java.util.List)2 Optional (java.util.Optional)2 DMNContext (org.kie.dmn.api.core.DMNContext)2 DMNMessage (org.kie.dmn.api.core.DMNMessage)2 BusinessKnowledgeModelNode (org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode)2 DecisionNode (org.kie.dmn.api.core.ast.DecisionNode)2 DMNBaseNode (org.kie.dmn.core.ast.DMNBaseNode)2 Msg (org.kie.dmn.core.util.Msg)2 MsgUtil (org.kie.dmn.core.util.MsgUtil)2 Collection (java.util.Collection)1 Collections (java.util.Collections)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Set (java.util.Set)1 Collectors (java.util.stream.Collectors)1 Collectors.toList (java.util.stream.Collectors.toList)1 QName (javax.xml.namespace.QName)1