gitgabrio commented on issue #1831:
URL:
https://github.com/apache/incubator-kie-issues/issues/1831#issuecomment-2662844210
Not sure to follow, anyway, WRT to
`<text>bkm_001({name: "foo"})</text>`
1. our engine detect that `bkm_001` requires a `tNameAndAge`
2. it tries to parse `{name: "foo"}` as `tNameAndAge`, but due to missing
property (`age`) validation fails, and translate to `null`
3. so, the invocation become `bkm_001(null)`
4. and bkm_001 in this case return `false`
As "wrong parameter", as per bkm definition
```xml
<businessKnowledgeModel name="bkm_001" id="_bkm_001">
<variable name="bkm_001"/>
<encapsulatedLogic>
<formalParameter name="nameAndAge" typeRef="tNameAndAge"/>
<literalExpression>
<text>nameAndAge != null</text>
</literalExpression>
</encapsulatedLogic>
</businessKnowledgeModel>
```
`null` is a perfectly valid parameter for it
AFAIK, the engine/spec has always been extremely permissive with `null`,
i.e. whenever an expression can't be parsed to object, it is simply translated
to `null` without any error thrown, by itself.
So, in this case, it is not clear to me how we could implement that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]