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

   BUG:
   The attached model thrown an error if input data contains more then one 
element, 
   
   ```java
   final DMNContext ctx3 = runtime.newContext();
   ctx3.set("p1", prototype(entry("Name", "P3"), entry("Interests", 
Arrays.asList("Golf", "Computer"))));
   final DMNResult dmnResult3 = runtime.evaluateAll( dmnModel, ctx3 );
   ```
   
   `10:54:05.424 [main] ERROR org.kie.dmn.core.util.MsgUtil.logMessage:83 - 
Error while evaluating node 'MyDecision' for dependency 'p1': the dependency 
value '{Interests=[Golf, Computer], Name=P3}' is not allowed by the declared 
type (DMNType{ 
http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442 : 
Person })
   `
   
   but it does not when executed from jitexecutor.
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
     -->
   
   <dmn:definitions 
xmlns="http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442";
                         xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/";
                         xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/";
                         
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/";
                         xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/";
                         
xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/";
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                         exporter="DMN Modeler"
                         exporterVersion="5.1.10.201705011622"
                         id="_238bd96d-47cd-4746-831b-504f3e77b442"
                         name="TypeConstraintsChecks"
                         
namespace="http://www.trisotech.com/definitions/_238bd96d-47cd-4746-831b-504f3e77b442";>
      <dmn:itemDefinition isCollection="false" label="Person" name="Person">
         <dmn:itemComponent id="_7939ee65-737d-4ea9-b912-448dd5fb2cf1"
                                 isCollection="false"
                                 name="Name">
            <dmn:typeRef>string</dmn:typeRef>
         </dmn:itemComponent>
         <dmn:itemComponent id="_19ef99ee-1d53-4185-aa9d-8fe58a7834ce"
                                 isCollection="true"
                                 name="Interests">
            <dmn:typeRef>tInterests</dmn:typeRef>
         </dmn:itemComponent>
      </dmn:itemDefinition>
      <dmn:itemDefinition label="tInterest" name="tInterest">
         <dmn:typeRef>string</dmn:typeRef>
      </dmn:itemDefinition>
      <dmn:itemDefinition isCollection="true" label="tInterests" 
name="tInterests">
         <dmn:typeRef>tInterest</dmn:typeRef>
        <dmn:typeConstraint 
xmlns:triso="http://www.trisotech.com/2015/triso/modeling"; >
          <dmn:text> count (?) = 1 </dmn:text>
        </dmn:typeConstraint>
      </dmn:itemDefinition>
      <dmn:decision xmlns:triso="http://www.trisotech.com/2015/triso/modeling";
                         id="_ed3b9794-9306-4b6a-b4f9-5486be3c5515"
                         name="MyDecision"
                         triso:displayName="MyDecision">
         <dmn:variable id="_2e39fe17-4902-40ba-a36c-7fe0d3d992b9"
                            name="MyDecision"
                            typeRef="string"/>
         <dmn:informationRequirement>
            <dmn:requiredInput href="#_27453770-68e3-48da-8605-d33a653c09ef"/>
         </dmn:informationRequirement>
         <dmn:literalExpression id="_71df1866-2b74-4d40-b4fd-0ebe860b27f1">
            <dmn:text>"The Person " + p1.Name + " likes " + string(count( 
p1.Interests )) + " thing(s)."</dmn:text>
         </dmn:literalExpression>
      </dmn:decision>
      <dmn:inputData xmlns:triso="http://www.trisotech.com/2015/triso/modeling";
                          id="_27453770-68e3-48da-8605-d33a653c09ef"
                          name="p1"
                          triso:displayName="p1">
         <dmn:variable id="_1c6c0e02-8b82-4d1f-88a6-a2e35b4eedc7"
                            name="p1"
                            typeRef="Person"/>
      </dmn:inputData>
   </dmn:definitions>
   ```


-- 
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]

Reply via email to