]
Tibor Zimányi updated DROOLS-2952:
----------------------------------
Sprint: (was: 2018 Week 39-41)
Hierarhical DataSource
----------------------
Key: DROOLS-2952
URL:
https://issues.jboss.org/browse/DROOLS-2952
Project: Drools
Issue Type: Enhancement
Components: core engine
Reporter: Mario Fusco
Assignee: Mario Fusco
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.