Hi Christopher,

Try this out.

rule

"Order not Accepted"

when

Message ( state1 : state, order1  : order)

eval(state1 == MessageState.RELEASING && order1.requestStatus == RequestStae.ACCEPT)

then

...

end

-Krishnan.




On 6/6/07, Christopher.Mathrusse@sybase.com <Christopher.Mathrusse@sybase.com> wrote:
I'm new to the rules syntax and a bit frustrated with trying to learn it. I've reviewed the docs but keep running into the same issue. I have a parent object, Message, that contains an Order. An Order has a status that I want to test. So looking at the documentation and taking my best guess I've created a rule as follows:
 

rule

"Order not Accepted"

when

$m : Message( state == MessageState.RELEASING, order.requestStatus == RequestStatus.ACCEPT )

then

...

end

The problem is that when I start my application I get a compilation error.

Caused by:

org.drools.rule.InvalidRulePackage: [54,48]: unknown:54:48 Unexpected token ','[54,70]: unknown:54:70 mismatched token: [@427,1915:1916='==',<75>,54:70]; expecting type LEFT_PAREN[54,95]: unknown:54:95 mismatched token: [@434,1940:1940=')',<37>,54:95]; expecting type LEFT_PAREN

at org.drools.rule.Package.checkValidity(

Package.java:368)
 
So what am I missing? I know it has to be something simple with my understanding of the syntax.
 
Thanks for the help...
 
Chris Mathrusse
christopher.mathrusse@sybase.com
(925) 236-5553
 

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
Sivaramakrishna Iyer Krishnan (Anand)

Never assume the obvious is true.
- William Safire