gitgabrio commented on issue #1831:
URL:
https://github.com/apache/incubator-kie-issues/issues/1831#issuecomment-2659061181
@baldimir @yesamer
I have the impression `decision_bkm_002` test is wrong.
`tNameAndAge` is a ComplexType with `name` (String) and `age` (number)
```xml
<itemDefinition name="tNameAndAge">
<itemComponent name="name">
<typeRef>string</typeRef>
</itemComponent>
<itemComponent name="age">
<typeRef>number</typeRef>
</itemComponent>
</itemDefinition>
```
`bkm_001` is a `BusinessKnowledgeModel` that return `true` if given
`nameAndAge` is != null, `false` otherwise
```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>
```
`decision_bkm_002` is a `Decision` that invokes `_bkm_001` with an invalid
`nameAndAge` (it miss age field)
```xml
<decision name="decision_bkm_002" id="_decision_bkm_002">
<variable name="decision_bkm_002"/>
<knowledgeRequirement>
<requiredKnowledge href="#_bkm_001"/>
</knowledgeRequirement>
<literalExpression>
<text>bkm_001({name: "foo"})</text>
</literalExpression>
</decision>
```
`_bkm_001` is invoked with `nameAndAge->null`, and correctly return `false`
--
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]