Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing built-in functions as function's parameters doesn't work #1752

Open
yesamer opened this issue Jan 15, 2025 · 1 comment
Open

Passing built-in functions as function's parameters doesn't work #1752

yesamer opened this issue Jan 15, 2025 · 1 comment
Labels
area:dmn Related to DMN area:engine Related to the runtime engines type:bug Something is behaving unexpectedly

Comments

@yesamer
Copy link

yesamer commented Jan 15, 2025

TCK Test 0092-feel-lambda - 014

Consider this Decision node

<decision name="decision_014_1" id="_decision_014_1">
        <variable name="decision_014_1"/>
        <knowledgeRequirement>
            <requiredKnowledge href="#_bkm_014_1"/>
        </knowledgeRequirement>
        <!-- passed built-in functions as params  -->
        <literalExpression>
            <text>bkm_014_1(abs, sqrt)</text>
        </literalExpression>
    </decision>

It results in the following error:

14:13:47.511 [main] WARN org.kie.dmn.core.util.MsgUtil.logMessage:84 - Parameter 'fn1' is of type 'DMNType{ http://www.montera.com.au/spec/DMN/0092-feel-lambda : lambda_number_returns_number }' but the actual value 'org.kie.dmn.feel.runtime.functions.AbsFunction@7153995c' is not an instance of that type; setting as null
14:13:47.512 [main] WARN org.kie.dmn.core.util.MsgUtil.logMessage:84 - Parameter 'fn2' is of type 'DMNType{ http://www.montera.com.au/spec/DMN/0092-feel-lambda : lambda_number_returns_number }' but the actual value 'org.kie.dmn.feel.runtime.functions.SqrtFunction@3b256d50' is not an instance of that type; setting as null
14:13:47.512 [main] ERROR org.kie.dmn.core.util.MsgUtil.logMessage:83 - FEEL ERROR while evaluating literal expression 'fn1(-5)*fn2(25)': Not an invocable: 'null'
14:13:47.512 [main] ERROR org.kie.dmn.core.util.MsgUtil.logMessage:83 - FEEL ERROR while evaluating literal expression 'fn1(-5)*fn2(25)': Not an invocable: 'null'

@yesamer yesamer added type:bug Something is behaving unexpectedly area:dmn Related to DMN area:engine Related to the runtime engines labels Jan 15, 2025
@jomarko
Copy link

jomarko commented Jan 17, 2025

Hi team, thank you for this issue, just FYI, I opened ticket for the editor, as there we miss the support for similar models #1756

@yesamer yesamer changed the title Passing built-in functions as function parameters doesn't work Passing built-in functions as function's parameters doesn't work Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dmn Related to DMN area:engine Related to the runtime engines type:bug Something is behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

2 participants