[
http://jira.jboss.com/jira/browse/JBRULES-1165?page=comments#action_12376012 ]
Mark Proctor commented on JBRULES-1165:
---------------------------------------
after thinking some more on this, for stateless sessions I think the only way is for
people to "export" globals that can be retrieved in the statefulsessionresults.
Where this is another hashmap, that is populated by the user instruction. you'd have
to provide an array of identifiers.
so something like
session.exportGlobalsAsResults( new String[] { "list", "people" } );
then on results they can do
results.getGlobal("list")
Now the proper global resolver and the results may still point to the same instance, not
sure how we can get around that for now (would require users to explicitly ask stuff to be
cloned), but its a good compromise for now. If the main global resolver gets reset, the
resutl's stay the same. Actually this makes me think that the StatelessSessionResults
shouldn't reference the working memory itself, but maybe just the assertMap....
StatelessSession does not have the ability to set globals.
-----------------------------------------------------------
Key: JBRULES-1165
URL:
http://jira.jboss.com/jira/browse/JBRULES-1165
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Reteoo
Affects Versions: 4.0.1
Reporter: Michael Neale
Assigned To: Mark Proctor
Fix For: 4.0.2
Most likely an oversight. However, to keep the stateless nature of the API - there
isn't another way to do this other then add more methods to the interface,
unfortunately.
--
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