[rules-users] Ways to list the globals

Wolfgang Laun wolfgang.laun at gmail.com
Thu May 2 01:24:27 EDT 2013


The code for setting and getting globals from RHS or Java code works
in all versions, 5.20 - 5.5.0.

I suspect, no: I'm sure, that OP has made the old error of expecting a
change in some global being done in RHS code to become effective in
some LHS rule condition, which, of course, isn't possible and that's
certainly no bug.

(@Sotty et al.: Perhaps we should stop reasoning about incompletely
described problems, i.e., without sufficient code. No "it might be
this or that" - just "show us the code, please"?!)

-W

On 02/05/2013, Davide Sottara <dsotty at gmail.com> wrote:
> I wonder if this was a bug that was already fixed in a later version.
> Could you try 5.5.0.Final or 5.6.0-SNAPSHOT?
>
> On 05/01/2013 08:17 PM, Sonata wrote:
>> Thank you so much for your quick reply!
>>
>> I am on 5.4. What I wanted to do is to list out the currently set globals
>> (with values) that can be used in the current active rule. So it seems
>> like
>> I should not go for the getGlobalVariables() option.
>>
>> But then if I use
>> ((MapGlobalResolver)drools.getKnowledgeRuntime().getGlobals()).getGlobals(),
>> it does not list those I set in java using session.setGlobal(), where
>> session is a StatefulKnowledgeSession before firing the rule. It ONLY
>> list
>> those I set in drl using drools.getWorkingMemory().setGlobal().
>>
>> Thanks
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Ways-to-list-the-globals-tp4023616p4023618.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list