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

Possible minor typo in doc example regarding enum

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Trivial Trivial
    • None
    • 8.44.0.Final
    • docs
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • NEW
    • NEW
    • ---
    • ---

      Should "DaysOfWeek.MONDAY" in rule example be changed to "DaysOfWeek.MON" to match enum definition?

      https://docs.drools.org/latest/drools-docs/drools/language-reference/index.html#con-drl-declarations-enumerative_drl-rules

      has this example

      "

      declare enum DaysOfWeek
         SUN("Sunday"),MON("Monday"),TUE("Tuesday"),WED("Wednesday"),THU("Thursday"),FRI("Friday"),SAT("Saturday");

         fullName : String
      end

      rule "Using a declared Enum"
        when
          $emp : /employees[ dayOff == DaysOfWeek.MONDAY ]
        then
          ...
      end

      "

       

              mfusco@redhat.com Mario Fusco
              jareddavis Jared Davis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: