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

[DMN Designer] Expression constraint is not parsed to Range constraint

XMLWordPrintable

    • 2019 Week 11-13
    • 3
    • Hide
      1. Create new dmn model
      2. Select data types tab
      3. Add new data type entry, set its type as date
      4. Click on the constraints
      5. Select expression and put: [date( "2016-07-29" )..date( "2016-07-30" )]
      6. Save constraint, save model, close and reopen
      7. Navigate to same data type entry, invoke constraint modal popup
      8. Change constraint from expression to range, ranges is not parsed
      Show
      Create new dmn model Select data types tab Add new data type entry, set its type as date Click on the constraints Select expression and put: [date( "2016-07-29" )..date( "2016-07-30" )] Save constraint, save model, close and reopen Navigate to same data type entry, invoke constraint modal popup Change constraint from expression to range, ranges is not parsed
    • NEW
    • NEW

      If the data type constraint is set as [date( "2016-07-29" )..date( "2016-07-30" )] [0], it is not recognized as an range in the [1].

      The problem is that our ParseService for parsing Range, doesn't check deeply, what is the type of StartNode [3]. And then the DateValueFormatter component fails to replace the leading date( [4].

      [0]

      [1]

      [3]
      https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-common-dmn/kie-wb-common-dmn-backend/src/main/java/org/kie/workbench/common/dmn/backend/editors/types/DMNParseServiceImpl.java#L54

      [4]
      https://github.com/kiegroup/kie-wb-common/pull/2508/files#diff-e199e1e595037dcb4b465ff36dd13a1f

              rh-ee-jomarko Jozef Marko (Inactive)
              rh-ee-jomarko Jozef Marko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: