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, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> 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:
[EMAIL PROTECTED],1915:1916='==',<75>,54:70]; expecting type LEFT_PAREN[54,95]:
unknown:54:95 mismatched token: [EMAIL PROTECTED],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
[EMAIL PROTECTED]
(925) 236-5553


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users




--
Sivaramakrishna Iyer Krishnan (Anand)

Never assume the obvious is true.
- William Safire
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to