[jboss-jira] [JBoss JIRA] (JBRULES-3322) declared class inserted from function hidden from engine
Mike Key (Created) (JIRA)
jira-events at lists.jboss.org
Fri Dec 30 12:08:09 EST 2011
declared class inserted from function hidden from engine
--------------------------------------------------------
Key: JBRULES-3322
URL: https://issues.jboss.org/browse/JBRULES-3322
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.3.0.Final
Reporter: Mike Key
Assignee: Mark Proctor
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list