ouch, nasty!!

   Can you please open a JIRA?

   Thanks,
     Edson

2008/2/6, Carlsen, Len <[EMAIL PROTECTED]>:
>
>  Hi,
>
>
>
> I have an expression where I am comparing a Boolean to a String which I
> would expect to fail but the expression always returns true. Is this
> expected behaviour?
>
>
>
> I modified the Drools HelloWorldExample and changed the status from an int
> to a boolean.
>
>
>
> *import* org.drools.examples.HelloWorldExample.Message;
>
> *rule* "Hello World"
>
>     *when*
>
>         m : Message( status == "hello", message : message )
>
> *    then*
>
>         System.out.println( message );
>
> *end*
>
>
>
> *public* *static* *class* Message {
>
>         *public* *static* *final* *boolean* *HELLO*   = *false*;
>
>         *public* *static* *final* *boolean* *GOODBYE* = *true*;
>
>         *private* String message;
>
>         *private* *Boolean* status;
>
>
>
>         *public* Message() {}
>
>         *public* String getMessage() { *return* *this*.message; }
>
>         *public* *void* setMessage(*final* String message) { *this*.
> message = message; }
>
>         *public* *boolean* getStatus() { *return* *this*.status; }
>
>         *public* *void* setStatus(*final* *boolean* status) { *this*.
> status = status; }
>
> }
>
>
>
>
>
> *final* Message message = *new* Message();
>
> message.setMessage( "Hello World" );
>
> message.setStatus( Message.*HELLO* );
>
> * *
>
> *final* StatefulSession session = ruleBase.newStatefulSession();
>
> session.insert( message );
>
> session.fireAllRules();
>
>
>
>
>
> Thanks very much,
>
>
>
> Len
>
> _______________________________________________
> rules-users mailing list
> [email protected]
> 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
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to