]
Edson Tirelli reassigned DROOLS-1621:
-------------------------------------
Assignee: Tibor Zimányi (was: Matteo Mortari)
DMN validation fails when executed on IBM JDK when checking
referenced types
----------------------------------------------------------------------------
Key: DROOLS-1621
URL:
https://issues.jboss.org/browse/DROOLS-1621
Project: Drools
Issue Type: Bug
Components: dmn engine
Affects Versions: 7.0.0.Final
Reporter: Tibor Zimányi
Assignee: Tibor Zimányi
Labels: reported-by-qe
Fix For: 7.1.0.Final
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