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

Rule relationship analysis core : map

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 7.54.0.Final
    • 7.46.0.Final
    • core engine
    • None
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      Track Map key/value (The map is a field of a fact)

      e.g. In RHS,

             then
                 $controlFact.mapData["ItemStatus"] = $status;
                 modify ($controlFact) {
                     mapData = $controlFact.mapData;
                 }
      

      In LHS of another rule,

             when
                 ControlFact(keyword == "XXX", mapData["ItemStatus"] == "YYY")
                 ...
      

      -> So we don't want to evaluate the impact by entire 'mapData'. Instead, we want to treat the key "ItemStatus" as each fact field. (In this case, it's positive on "ItemStatus")

      Also consider the use function for the map so it would be like:

             when
                 ControlFact(keyword == "XXX", convertMapData(mapData, "ItemStatus") == "YYY")
      

            rhn-support-tkobayas Toshiya Kobayashi
            rhn-support-tkobayas Toshiya Kobayashi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: