[rules-users] Rule is not firing

Macon Pegram mpegram3rd at gmail.com
Mon Oct 26 08:08:12 EDT 2009


try simply:

rule "Your First Rule"
     dialect "mvel"
     when
          Message(message == "Hello"  )
     then
          System.out.println("First Rule fired    ");
end

On Mon, Oct 26, 2009 at 6:34 AM, satyasri.ch <satyasri.ch at gmail.com> wrote:

>
> Hi ,
>
> I am doing the sample drools project.
>
> Below are the sample rule and Fact class.
>
> when Running from eclipse ide both rules are working fine.
> Where as running the rule outside eclipse  ide only second rule fired .
>
> Suggest me any ideas
>
>
> ----------------------------------------------------------
> package test
> import test.Message;
>
>
> rule "Your First Rule"
> dialect "mvel"
> when
> m:Message(  )
> eval(m.getMessage() == "Hello")
> then
> System.out.println("First Rule fired    ");
> end
>
> rule "Your Second Rule"
> dialect "mvel"
> when
> eval(true)`
> then
> System.out.println("Second Rule fired    ");
> end
>
> ------------------------
>
> package test;
> public class Message{
> private String message;
> public String getMessage(){
> return this.message;
> }
>
> public void setMessage(String message) {
> this.message = message;
> }
>
> }
>
>
> Thanks,
> Satyasri.
> --
> View this message in context:
> http://www.nabble.com/Rule-is-not-firing-tp26056180p26056180.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091026/6c91b0e8/attachment.html 


More information about the rules-users mailing list