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

Defect(s) in DSL and Enumerations

XMLWordPrintable

      The following works like you would think:

      [when]xxx

      {l:ENUM:MyBean.l} {x:ENUM:MyBean.x} {y:ENUM:MyBean.y}=eval($sep.foo("any", "any", "{l}

      ", "

      {x}", "{y}", "", ""))

      Defect 1
      If you remove the spaces between the "} {"
      [when]xxx {l:ENUM:MyBean.l}{x:ENUM:MyBean.x}{y:ENUM:MyBean.y}=eval($sep.foo("any", "any", "{l}", "{x}

      ", "

      {y}

      ", "", ""))

      l = ""
      x = ""
      y = l + x + y

      Defect 2
      Even in the first case, if the Enumeration returns a value that has space(s) in it (which maybe should not be allowed?) it will make for odd substitutions as well.

      Note that I need spaces to be supported.

      Defect 3
      Regardless of the date format specified the substitution always dd-MMM-yyyy

      {startTime:DATE:"dd-MMM-yyyy HH:mm"} {startTime:DATE:"dd-MMM-yyyy:HH:mm"} {startTime:DATE:"dd-MMM-yyyy@HH:mm"} {startTime:DATE:"HH:mm"}

      all result in "25-Feb-2014"

            mproctor@redhat.com Mark Proctor
            texasjjjjj_jira Stephen Johns (Inactive)
            Jozef Marko Jozef Marko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: