-
Enhancement
-
Resolution: Done
-
Major
-
7.0.0.Beta6
-
None
-
NEW
-
NEW
Given this DRL:
global java.util.List list
rule R when
$t : CarType(id == \"roadster\")
accumulate(
$c : Car(type == $t);
$total : count($c)
)\
then
list.addAll(kcontext.getMatch().getObjects());
end
and then inserting the roadster type and 3 cars of that type:
CarType roadsterType = new CarType("roadster"); ksession.insert(roadsterType); Car bmwZ4 = new Car("BMW Z4", roadsterType); ksession.insert(bmwZ4); Car lotusElise = new Car("Lotus Elise", roadsterType); ksession.insert(lotusElise); Car mazdaMx5 = new Car("Mazda MX-5", roadsterType); ksession.insert(mazdaMx5);
then the Match.getObjects() (or getObjectsDeep()) should include every Car instance too.
Let's discuss. Maybe we need a new method getObjectsDeep() instead if we can't change getObjects() for backwards compatibility reasons.
- blocks
-
PLANNER-631 Engine: indictmentMap (reverse of ConstraintMatch's justificationList) for visualization and Guided Local Search
- Resolved
- is related to
-
DROOLS-1474 Activation.getObjectsDeep() should include "exists" elements too
- Closed