-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
5.3.0.Final
-
None
When declaring a class within a DRL and using a function to insert a populated fact into working memory, the inserted class is not seen by the engine and therefore not available to downstream rules. See steps to reproduce for an example.
Explanation from users mailing list (Wolfgang Luan):
This is a bug. Please submit a JIRA.
In spite of all the fixes that have been made, using dialect "mvel" is still risky.
In this case, it would appear that the WM insert from inside the called function is somehow hidden from the Engine due to the RHS being evaluated in a MVEL context. You can easily verify this by adding another rule:
rule "objects"
-
- agenda-group "Foo" (not
when
$object: Object()
then
System.out.println( "Fact: " + $object.getClass() + " " + $object);
end
- agenda-group "Foo" (not