Kogito & Drools

11 views
Skip to first unread message

Qbyte Consulting

unread,
Mar 2, 2021, 12:35:52 AM3/2/21
to Kogito development mailing list
Hi,

Using Kogito as a rule engine, is there a way that for a cart discounting system we could deactivate a rule after it has been fired a fixed number of times - considering of course the the rule could be fired over scores of different nodes in a cluster?

regards
John

Toni Rikkola

unread,
Mar 5, 2021, 4:31:10 AM3/5/21
to kogito-de...@googlegroups.com
Hi,

I suspect in this situation you would have to maintain a counter outside of the rules and check if the discounts have run out. Then pass in the amount either when the rules are fired or fetch the count with the rules during evaluation ( if possible ).

Now to keep track of how many times a rule has fired. I feel like it would be most simple and clear for the rule authors if the counter was updated in rule LHS.

Toni

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/2c807a9e-9500-46ce-b06a-2b55990ddbb7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages