[rules-dev] Guvnor and drools implementation - questions

Geoffrey De Smet ge0ffrey.spam at gmail.com
Tue Mar 1 06:52:00 EST 2011


Please use the user mailing list for user questions.

Op 01-03-11 11:38, ioda100 schreef:
> Hi,
>
> i have a few questions :
>
> 1) my facts are in fact java Maps, is there an easy way to deal with them in
> guvnor? it's not like in the example where facts are objects and we give
> guvnor the Pojo model to know what we can do with it
>
> for example i have :
> $m  : Map((this["attribute1_of_the_map"] == "test1"))
>
> How to deal with the map and have a prepopulated list of properties of the
> map? And to store it in the variable $m. Without using the "free from drl"
> where we have to write it by hand.
>
> 2) how to deal with global constant with guvnor?
>
> i have something like :
> WorkingMemory wm = drools.getWorkingMemory();
> wm.setGlobal("resultValue", "OK");
>
> Is it a direct way to play with global constant in Guvnor? Without using the
> "free from drl" where we have to write it by hand.
>
> 3) for stopping firing rules after one rule fire successfully, do you know
> if there is an option to do that?
> For now i insert a boolean in the session and the first condition in all my
> rules is that this boolean is there. When a rule fires successfully, i
> retract it. I suppose there is a bettre way to do it?
>
> Thanks in advance for your help
>

-- 
With kind regards,
Geoffrey De Smet




More information about the rules-dev mailing list