You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yesamer (via GitHub)" <gi...@apache.org> on 2024/07/31 11:54:05 UTC

[I] Passing an incorrect type value as single input of a Decision Services should lead to an error [incubator-kie-issues]

yesamer opened a new issue, #1410:
URL: https://github.com/apache/incubator-kie-issues/issues/1410

   ```
       <!-- passing an incorrect type value as single input decision param -->
   
       <decisionService name="decisionService_007" id="_decisionService_007">
           <variable name="decisionService_007"/>
           <outputDecision href="#_decision_007_2"/>
           <inputDecision href="#_decision_007_3"/>
       </decisionService>
   
       <decision name="decision_007_1" id="_decision_007_1">
           <variable name="decision_007_1"/>
           <knowledgeRequirement>
               <requiredKnowledge href="#_decisionService_007"/>
           </knowledgeRequirement>
           <literalExpression>
               <text>decisionService_007(123)</text>
           </literalExpression>
       </decision>
   
       <decision name="decision_007_2" id="_decision_007_2">
           <variable name="decision_007_2"/>
           <informationRequirement>
               <requiredDecision href="#_decision_007_3"/>
           </informationRequirement>
           <literalExpression>
               <text>decision_007_3 = null</text>
           </literalExpression>
       </decision>
   
       <!-- provided as input, so never gets invoked -->
       <decision name="decision_007_3" id="_decision_007_3">
           <variable typeRef="string" name="decision_007_3"/>
           <literalExpression>
               <text>"I never get invoked"</text>
           </literalExpression>
       </decision>
   ```
   
   With the current implementation, this results in a Warning with a returned result.
   ```
   -----
   Message [id=0, level=WARNING, path=/Users/yamer/Projects/tck/runners/dmn-tck-runner-drools/../../TestCases/compliance-level-3/0085-decision-services/0085-decision-services.dmn, line=0, column=0
      text=DMN: Decision Service parameter 'decision_007_3' is of type 'DMNType{ https://www.omg.org/spec/DMN/20230324/FEEL/ : string }' but the actual value '123' is not an instance of that type; setting as null (The named parameter does not match) ]
   -----
   
   09:58:59.012 [main] INFO  o.o.d.t.runner.drools.DroolsTCKTest.executeTest:310 - Result context: {
       decisionService_007: function decisionService_007( decision_007_3 )
       decision_007_1: true
   }
   ```
   
   According to the TCK tests, The correct behavior (please double check in the specs) should be an Error with null as a result.
   
   


-- 
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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Passing an incorrect type value as single input of a Decision Services should lead to an error [incubator-kie-issues]

Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir closed issue #1410: Passing an incorrect type value as single input of a Decision Services should lead to an error
URL: https://github.com/apache/incubator-kie-issues/issues/1410


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org