[BE] Decision Tables - input of type Integer not validated

Description

Steps to reproduce the problem:

Create a new Decision Table with a rule having an input field of type integer and use a string value
Validate/Save DT

Expected behaviour:
The Validate/Save action should detect the error

Current behaviour:
The Validate/Save action doesn't detect the error

Environment

None

Testcase ID

None

Activity

Show:
Abdul Mohammed
March 29, 2021, 5:27 PM

The Pull Request had to be re-written from the scratch due to limitations with use of w3c dom library vs camunda’s dmn library (as it provide native methods to extract decisions information). Also, instead of grouping all the data types in one method, this was refactored via an interface with boolean, date, integer, long and double data type implementations.

During the work few other tools/external libraries were also investigated to ease the validation process like:

  • dmn-check: But, this was not catching any data type mismatch exceptions.

  • DMN Engine’s parseDecisions and .isDecisionTable() , but this too was not fruitful in catching invalid data type values.

We should be in a good position as multiple decisions inside a single dmn file can now be validated.

Abdul Mohammed
March 22, 2021, 4:03 PM
Edited

I tried exploring drools: DMNValidatorImpl but it seems there is an issue with drools expectation from provided perfectly valid Decision Model with regards to Decision node 'Decision_XXXXXX' is missing the variable declaration.

The above was a valid DMN model. I also noted something around drool validation with camunda library dmn model.

Abdul Mohammed
March 8, 2021, 12:57 PM

Covering all the data types allowed in Decision Table to validate against their provided values.

Abdul Mohammed
March 8, 2021, 9:46 AM

It seems a third-party library Camunda is handling all the validation of Decision Table and in order to further validate for data types we need to perform it separately.

Currently, am in the process of adding a new method after Camunda library’s validation here which is the exit point where the XML file and it’s schema is being validated.

Abdul Mohammed
March 8, 2021, 9:41 AM

Git PR:

Assignee

Abdul Mohammed

Reporter

Bogdan Cilibiu

Labels

Premier Customer

None

Security Issue

None

Target Platform

None

Code Branch

None

Build Location

None

Regression Since

None

Work Funnel End

None

Patch Attached

None

Dependent Version/s

None

Cloud or Enterprise

None

Prioritization Score

None

Delivery Team

Team 3

Bug Priority

Category 3

Components

Sprint

Affects versions