This is a follow up on my previous question. I have a decision tree in the following form:
and I want to transform it into rules in Drools Expert. The use of insertLogical
has been proposed. Drools documentation says this about insertLogical
:
insertLogical(new Something())
; is similar to insert, but the object will be automatically retracted when there are no more facts to support the truth of the currently firing rule.
The fact that these objects are retracted is useful (as I'll have tens of thousands of objects in memory and each will create a bunch of these). There's also a method retract(object)
, which removes an object from working memory. When I get to an end node and remove (retract
) the base object that would get there (following the decision tree), does it also remove all these temporary objects created with insertLogical
during the traversal?