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

Type mismatch when doing OR on collect statements for collect pattern

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • None
    • None

    Description

      When having a rule like this:

       

      rule "Rule that breaks ExecutableModel"
      @filename("rules.drl")
      ruleflow-group "RFG-1"
      salience 5
      no-loop true
      when
              $list: List()
              $cwvs:    (
                  List(size > 0) from collect ( ClassWithValue(value == null) ) or
                  List(size > 0) from collect ( ClassWithValue(value != null) )
              )
          then
              $list.addAll($cwvs);
      end

       

      The executable model will try to do the constraint checks which are supposed to happen in the pattern for the collect on the type of the or expression - list in this case.

      The old model does not fail here.

       

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            fbraun4358 Florian Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: