Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1621

DMN validation fails when executed on IBM JDK when checking referenced types

    XMLWordPrintable

Details

    • 2017 Week 24-25
    • NEW
    • NEW

    Description

      When running test method ValidatorTest.testVALIDATION(), the test fails with this output[1]. This is caused by rules TYPEREF_NOT_FEEL_NOT_DEF_p1 and TYPEREF_NOT_FEEL_NOT_DEF_p2 from dmn-validation-rules-typeref.drl matching during validation and so triggering errors.

      It looks like this is caused by different evaluation of constraint not( ItemDefinition( name == $typeRef ) ) on IBM JDK. $typeRef is of type QName. It looks like that when running on ORacle JDK, the toString() method of QName is invoked automatically so the ItemDefinition is matched. Otherwise, when running on IBM JDK, the constraint must be changed to not( ItemDefinition( name == $typeRef.toString() ) ) so ItemDefinition is matched. I'm not sure if this is really the cause of this problem or just a workaround. The session looks properly populated with facts during validation.

      Possible fix that adds toString() to appropriate validation rules can be found here [2].

      [1] https://gist.github.com/baldimir/2dbc678886ad30a091a30bdb1d91f4cf
      [2] https://github.com/kiegroup/drools/pull/1332

      Attachments

        Activity

          People

            tzimanyi@redhat.com Tibor Zimányi
            tzimanyi@redhat.com Tibor Zimányi
            Tibor Zimányi Tibor Zimányi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: