Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-1905

Guided Editor breaks free form DRL which includes setter method with multi parameters

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.1.0
    • 6.0.1
    • Business Central
    • None

      Description of problem:

      If you use a Free Form DRL in a Guided Editor which includes call of a setter method with multiple parameters after saving and refreshing such a rule Guided Editor simply "breaks it".

      You are probably asking why would I setter method with multiple parameters, but one real use case is to call WorkflowProcessInstance.setVariable("param","value")

      Version-Release number of selected component (if applicable):

      BPM 6.0.2
      How reproducible:
      always

      Steps to Reproduce:
      1. Create Guided rule, with free form DRL in the RHS. Make sure there is call of a sether method which includes multiple params
      2. save the rule, refresh the page
      3. open the rule again, type something in the setter field
      4. save the rule again

      Following exception is displayed:

      17:03:53,400 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (EJB default - 4) Unable to build KieBaseModel:defaultKieBase
      Unable to Analyse Expression $process.setVariable( "5ne\",\"two" );:
      [Error: unable to resolve method using strict-mode: org.kie.api.runtime.process.WorkflowProcessInstance.setVariable(java.lang.String)]
      [Near :

      {... $process.setVariable( "5ne\",\"two" ); ....}

      ]
      ^
      [Line: 3, Column: 0] : [Rule name='sampleRule']

      Actual results:

      Guided Editor is not able to cope with the Free Form DRL which includes call of a setter method with multiple parameters
      Expected results:

        1. [1] initial version of the rule.png
          18 kB
          Anton Giertli
        2. [2] rule after refresh.png
          20 kB
          Anton Giertli
        3. [3] rule after re-save.png
          41 kB
          Anton Giertli
        4. ER2 - deformed guided editor.png
          7 kB
          Zuzka Krejčová
        5. Method chaining in editor.png
          46 kB
          Marian Macik
        6. Method chaining - source code of the rule.png
          46 kB
          Marian Macik

              manstis@redhat.com Michael Anstis
              rhn-support-agiertli Anton Giertli
              Archiver:
              rhn-support-ceverson Clark Everson
              Marian Macik Marian Macik
              Linda Snyder Linda Snyder (Inactive)
              Marian Macik Marian Macik
              Kris Verlaenen

                Created:
                Updated:
                Resolved:
                Archived: