[rules-users] Assistance with DSL syntax
Anstis, Michael (M.)
manstis1 at ford.com
Thu Sep 13 03:52:16 EDT 2007
I think there was an API change for 4.0.x - "retract" became
"retractObject".
________________________________
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of
Christopher.Mathrusse at sybase.com
Sent: 13 September 2007 02:18
To: Rules Users List
Subject: Re: [rules-users] Assistance with DSL syntax
I was just looking for a more "short hand" syntax, one where I
would not need to declare "theOrder".
On the same subject though, I compiled my rules with the DRL/DSL
editors in Eclipse (very nice by the way) and I am getting a compilation
error being caused by my DSL entry:
[consequence][]Manually release the
Order=setManualRelease(drools.getRule().getName());retract(theOrder);
It seems that there is an issue with the
retract(theOrder);statement.
The method retract(Order) is undefined for the type
Rule_Maximum_Order_Amount_Exceeded_0
Might you have any idea as to why this would be occurring or
exactly what the message is meaning?
Thanks for the help...
"Edson Tirelli" <tirelli at post.com>
Sent by: rules-users-bounces at lists.jboss.org
09/12/2007 05:55 PM
Please respond to
Rules Users List <rules-users at lists.jboss.org>
To
"Rules Users List" <rules-users at lists.jboss.org>
cc
Subject
Re: [rules-users] Assistance with DSL syntax
Yes, that is correct.
Why do you mean by a "cleaner" way?
[]s
Edson
2007/9/12, Christopher.Mathrusse at sybase.com
<mailto:Christopher.Mathrusse at sybase.com>
<Christopher.Mathrusse at sybase.com
<mailto:Christopher.Mathrusse at sybase.com> >:
I'm using a DSL with my DRL file and I've read through the
documentation but I've gotten hung-up on the syntax. Below is a rule
from my DRL and the expansion in my DSL.
My rule in the DRL:
rule "Maximum Order Amount Exceeded"
salience 9800
when
There is an Order with
- an amount that exceeds 100000
then
Manually release the Order
end
My DSL:
[condition][]There is an Order with=Order()
[condition][]- an amount that exceeds {number}=amount >=
{number}
[consequence][]Manually release the
Order=setManualRelease(drools.getRule().getName());
What I would like to do is add to my consequence the following
in red:
[consequence][]Manually release the
Order=setManualRelease(drools.getRule().getName());retract(theOrder);
I know that I would need to modify my condition statement to be
able to use the variable theOrder in my call to retract:
[condition][]There is an Order with=theOrder : Order()
but is there a cleaner way to achieve this?
_______________________________________________
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
<https://lists.jboss.org/mailman/listinfo/rules-users>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070913/25ba6fb1/attachment.html
More information about the rules-users
mailing list