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

Hierarhical DataSource

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • core engine
    • None
    • 8
    • NEW
    • NEW

    Description

      A really useful addition to DataSources would be scoped hierarchy.

      Lets say I make DataSource d1, and unit u1 is instantiated with it.

      I then want to instantiate d2, where d1 is the parent. I then instantiate u2 with d2.

      That means u2 can seemlessly see and react to all the data in d2 and d1. u1 can only see and react to u1.

      If u2 does inserts, those go into d2.

      If u2 is garbage collected and no references remain on d2, it is also GC'd. This allows a for temporary and local DataSources, scoped to a given unit.

      We can then add control structure methods such as:
      moveAllToParent()
      This would move all the FHs in d2 into d1. We might do this if u2 successfully finishes and d2 is about to be discarded, but we want to keep the results.

      For a given DataSuorce we should be able to determine if it's root, or get it's level. We should always be able to get and insert into root, parent, or any numerically specific level.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: