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

DMN Validator raising false positive errors for type resolution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.7.0.Final
    • 7.6.0.Final
    • dmn engine
    • None
    • 2018 Week 13-14
    • Hide

      See linked PR.

      Show
      See linked PR.
    • NEW
    • NEW

      DMN Validator is raising false positives for errors on type resolution. It looks like it is happening since the following commit was done:

      https://github.com/kiegroup/drools/commit/9e2fdc4b5e83bb9b5350a37fd89dab8f38cc8582

      The problem is that the .toString() call on the QName will return the full name, including the namespace:

      {http://www.trisotech.com/definitions/_6cfe7d88-6741-45d1-968c-b61a597d0964}

      tDailyPrice

      And that will always fail the constraint:

      ItemDefinition( name == $typeRef.toString() )

      I believe the correct would be to change the constraint to:

      ItemDefinition( name == $typeRef.getLocalPart() )

      But we might also need to check the namespace somehow.

              etirelli@redhat.com Edson Tirelli
              etirelli@redhat.com Edson Tirelli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: