[rules-users] Why does it make this error?PB using globals

Nemesis nemesis29 at free.fr
Thu Feb 14 16:15:43 EST 2008


Effectivly, when you read the documentation it's clearly stated ^^.

But the other problem that occured was that when i put an immutable 
object in my stateless session the rule won't fired.

I have found another way to achieve my goal so...

Nicolas

Edson Tirelli a écrit :
>
>    Globals are supposed to be immutable, specially if you are using 
> them on the LHS.
>   
>    []s
>    Edson
>
> 2008/2/14, nemesis29 at free.fr <mailto:nemesis29 at free.fr> 
> <nemesis29 at free.fr <mailto:nemesis29 at free.fr>>:
>
>     Ok i found that i resolve this isue when usin an object immutable
>     to embed my
>     boolean value.
>
>     But no when the global is set in the rule the rule doesn't fire
>     any more, but if
>     i comment the global line the rule fires.....
>
>     Any clue?
>
>     Thanks
>
>     Nicolas
>
>     Selon nemesis29 at free.fr <mailto:nemesis29 at free.fr>:
>
>
>     > hello all,
>     >
>     > Well i try to use global in one of my rules and it doesn't go
>     well ^^.
>     >
>     > So in my code i have declared a Boolean flagTest = new
>     Boolean(true), set it
>     > to
>     > a statless session : session.setGlobals("debugFlag",
>     flagTest)and in my rule
>     > i
>     > have put :
>     >
>     > global java.lang.Boolean debugFlag.
>     >
>     > When Drools does : globals.putAll( newPkg.getGlobals() ); line
>     495 in
>     > AbstractRuleBase it throw
>     java.lang.UnsupportedOperationException :-s
>     >
>     > Is it normal or is it a bug??
>     >
>     > Nicolas
>     > _______________________________________________
>     > rules-users mailing list
>     > rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>     > https://lists.jboss.org/mailman/listinfo/rules-users
>     >
>
>
>     _______________________________________________
>     rules-users mailing list
>     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> -- 
>   Edson Tirelli
>   JBoss Drools Core Development
>   Office: +55 11 3529-6000
>   Mobile: +55 11 9287-5646
>   JBoss, a division of Red Hat @ www.jboss.com <http://www.jboss.com>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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