[jboss-jira] [JBoss JIRA] Closed: (JBRULES-445) behavior of globals?
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Wed May 30 23:35:08 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-445?page=all ]
Mark Proctor closed JBRULES-445.
--------------------------------
Resolution: Won't Fix
java is pass by reference, you cannot change the value of a global this way. Please consult the mailing lists if you continue to misunderstand this.
> behavior of globals?
> --------------------
>
> Key: JBRULES-445
> URL: http://jira.jboss.com/jira/browse/JBRULES-445
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 3.0.4
> Reporter: G?bor Lipt?k
> Assigned To: Mark Proctor
> Priority: Minor
>
> It seems that the value of DRL globals without external env backup is removed between rules:
> package globaltest
> import Policy;
> global java.lang.String text;
> rule "Foo"
> salience 999
> when
> Policy()
> then
> text="foo";
> System.out.println("foo+"+text);
> end
> rule "Bar"
> salience 998
> when
> Policy()
> then
> System.out.println("bar+"+text);
> text="bar";
> System.out.println("bar+"+text);
> end
> results in:
> foo+foo
> bar+null
> bar+bar
> The documentation does not seem to provide details if this is the expected behavior.
> Please comment. Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list