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

DROOLS-909: KIE Workbench: ExpressionBuilder does not include all MethodInformation's in selector

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.3.0.Final
    • 6.2.0.Final
    • kie server
    • None
    • Hide

      1) Just build any model with String field.
      2) try to build rule that use function toLowerCase() with expression editor.
      3) Assert rule.

      Show
      1) Just build any model with String field. 2) try to build rule that use function toLowerCase() with expression editor. 3) Assert rule.
    • Workaround Exists
    • Hide

      Using Free form line and enter the rule directly.

      Show
      Using Free form line and enter the rule directly.
    • Low
    • NEW
    • NEW

    Description

      When trying to use "Expression editor" in the guided rule screen of the web app, combining with restrictions on String fields which use functions like "toLowerCase" , "toUpperCase" -
      Expression editor leaves a blanc field to fill and if left blanc - KIE automatically fill it with "" - and rule doesn't get compiled.

      So instead of getting for example;
      1. | package ido.droolsrules.dqsrulesqa;
      2. |
      3. | import java.lang.Number;
      4. |
      5. | rule "Test Camera Model"
      6. | dialect "mvel"
      7. | when
      8. | cam1 : Camera( brand.toLowerCase() == "sony" )
      9. | then
      10. | cam1.setLens( 5.0 );
      11. | end

      Rule is generated (In source tab) as:

      1. | package ebay.droolsrules.dqsrulesqa;
      2. |
      3. | import java.lang.Number;
      4. |
      5. | rule "Test Camera Model"
      6. | dialect "mvel"
      7. | when
      8. | cam1 : Camera( brand.toLowerCase("") == "sony" )
      9. | then
      10. | cam1.setLens( 5.0 );
      11. | end

      view line 8 to spot difference.

      Attachments

        1. CameraObj.JPG
          CameraObj.JPG
          68 kB
        2. CameraRuleGuided.JPG
          CameraRuleGuided.JPG
          53 kB
        3. CameraRuleGuidedSource.JPG
          CameraRuleGuidedSource.JPG
          36 kB
        4. CameraRuleGuidedSourceError.JPG
          CameraRuleGuidedSourceError.JPG
          57 kB

        Activity

          People

            manstis@redhat.com Michael Anstis
            ireshef Eido Reshef (Inactive)
            Eido Reshef Eido Reshef (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: