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?