[jboss-jira] [JBoss JIRA] (DROOLS-1474) Activation.getObjectsDeep() should include "exists" elements too
Geoffrey De Smet (JIRA)
issues at jboss.org
Sat Mar 11 11:34:00 EST 2017
[ https://issues.jboss.org/browse/DROOLS-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13376360#comment-13376360 ]
Geoffrey De Smet commented on DROOLS-1474:
------------------------------------------
Note that it doesn't make sense to include "not" elements in getObjectsDeep(), including "not exists" (which is the same basically), because they aren't to blame for the rule matching (or all facts are to blame, so that would be pointless too).
> Activation.getObjectsDeep() should include "exists" elements too
> ----------------------------------------------------------------
>
> Key: DROOLS-1474
> URL: https://issues.jboss.org/browse/DROOLS-1474
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Affects Versions: 7.0.0.Beta6
> Reporter: Geoffrey De Smet
> Assignee: Mario Fusco
>
> _Give them a finger and they'll want a hand. Give them a hand and they'll want an arm._ (dutch proverb)
> The Activation.getObjectDeeps() method introduced for DROOLS-1470 that also includes the accumulates elements, should also include the exists elements. For example:
> {code}
> when
> $c : Computer(id = "c1")
> exists Process(computer == $c)
> then ...
> {code}
> with this data
> {code}
> Computer c1;
> Computer c2;
> Computer c3;
> Process pA = new Process(c1);
> Process pB = new Process(c2);
> Process pC = new Process(c1);
> Process pD = new Process(c3);
> {code}
> gives this result
> {code}
> activation.getObjectsDeep() // includes c1, pA and pC.
> {code}
> The goal is to identify all objects that matched when this rule got fired. In a negative score rule, all those objects are to blame and by focusing to change any of those, it's more likely to improve the overall solution.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list