[rules-users] Logical insert and cyclic rules dependences

zephyr ls262570 at students.mimuw.edu.pl
Mon Jul 2 09:29:51 EDT 2012


zephyr wrote
> 
> I want to use "magick" of logical insert to keep dynamically changing
> inferred facts up to date. The problem are cyclic dependences:
> 
> "a -> b" means "when a than insertLogical( new b()) end"
> 
> a -> b
> b -> c
> c -> b
> 
> when i insert "a" b and c are correctly inferred (they check equals so it
> doesnt loop)
> but when i remove a they persist, as they make they're rules active
> because ot the cycle
> 
> is there a good way to remove such logical facts not supported by inserted
> data?
> 

I thought maybe if next reference didnt increase the counter but instead
waited on some data structure, then after a fact and its implications are
removed those facts with counter 0 could see wheather there are any rules
still referencing them. As only one points at a time this should remove
cycles that stay after node is removed, but im not 100% shure it would work,
it can undo and insert again some facts [in my case its not that bad, but as
a general solution seems bad] and probably i would have to edit drools
files.

Hmm maybe there is some kind of better way to deal with this.

--
View this message in context: http://drools.46999.n3.nabble.com/Logical-insert-and-cyclic-rules-dependences-tp4018381p4018390.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list