[rules-users] Roll Back Rule / Rule Transactions?

Olenin, Vladimir (MOH) Vladimir.Olenin at moh.gov.on.ca
Tue Feb 13 11:35:26 EST 2007


NOTE: I'm not a DROOL expert. Keeping this in mind, I'd say....


You'd need a separate rule which states:

 - if a cart does NOT contain TV, remove any free VCR from the cart if any

Once you retract the 'TV' fact from WorkingMemory and refire the rules (or
they will automatically refire?), this new rule will be activate and remove
the free VCR from the cart.

Just my 2c...

Vlad

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Matt Johnston
Sent: 13 February 2007 11:21
To: rules-users at lists.jboss.org
Subject: [rules-users] Roll Back Rule / Rule Transactions?

I am working on rules for an online shopping cart. Depending on the
products in the cart, the customer may get certain discounts.

If cart contains a TV, add a free VCR.

I can apply these rules, but what about rolling them back? 

So in the example above, the rule automatically added a free VCR because
the cart contained a TV. If the customer removes the TV, I need to roll
back the VCR rule and also remove the VCR from the cart.

Does anyone know how to do this? Is it possible?

Matt Johnston
Manager of Internet Content
Publishing Group of America
p: 615-468-6053
f: 615-468-6153

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



More information about the rules-users mailing list