Hi everyone,
I have this scenario: A diagram with nodes and arcs between them.
I'm willing to control the visual elements with rules.
Nodes are asserted at the moment of insertion. Object node = new AnyObject() ;
   FactHandle hNode = workingMemory.assertObject( node ) ;
Nodes are retracted from working memory when are deleted from the diagram.
   workingMemory.retractObject( hNode ) ;

Arcs can not exist in the diagram if any of the related nodes no longer exists.
So I must have a rule that keeps consistency in the diagram, something like:


   ## to illustrate the problem just checking source
   rule "Delete no longer valid arcs"
when a : Arc(s: source, tag, t: target) not s: Object()
   then
       retract(a) ;
   end

But the rule is not working, help is much appreciated
Regards,
Gerardo Segura

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to