[rules-users] query or global
thomas kukofka
thomaskukofka at web.de
Mon Jul 28 09:15:06 EDT 2008
Hello again,
what are disadvantages and advantages of the following possibillities to to
get access to working memory facts from outside:
- -uses a query:
in drl:
query "queryname"
...
end
in java code
queryResults results = workingMemory.getQueryResults( "queryname" );
- -use globals that store facts:
global java.util.HashMap service
rule "XY"
when
f: FactX ()
then
ResultFact resultFact = new ResultFact();
service.put(f.getName(), resultFact);
insert(resultFact);
end
kind regards
tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080728/df3fb62c/attachment.html
More information about the rules-users
mailing list