[rules-users] Web decision tables (Guvnor)

Stephen Masters stephen.masters at me.com
Fri Aug 10 10:50:27 EDT 2012


Hi folks,

Given a decision table a bit like this (hopefully the monospaced font lays it out ok!):

Account Currency CanTrade
   1       EUR       Y
   1       USD       Y
   1       IDR       Y
   1     Otherwise   N
   2       EUR       Y
   2       USD       Y
   2     Otherwise   N

LHS conditions are generated a bit like this:
	account == 1, currency == 'EUR'
	account == 1, currency == 'USD'
        account == 1, currency == 'IDR'
	account == 1, currency not in ('EUR', 'USD', 'IDR')
	account == 2, currency == 'EUR'
	account == 2, currency == 'USD'
	account == 2, currency not in ('EUR', 'USD', 'IDR')

… which has the effect that for account 2, currency IDR, the rule does not fire. For the business analysts building the rules, this does't make a lot of sense, as they're expecting it to mean:
	account == 2, currency not in ('EUR', 'USD')

Unfortunately this means that if a currency is permitted for one account, then a row must be added for every other account, indicating that the currency is not permitted.

I'm trying to achieve a sensible default (fire the rule to reject the trade) unless the currency is explicitly permitted.

Is there a decent mechanism for achieving this in a decision table?

One alternative I can think of is to create a technical rule which logically inserts a rejection which exists as long as this rule hash't fired. But I would really prefer to avoid doing anything like that, as I reckon it would be something of a maintenance nightmare.

Any thoughts?

Cheers,

Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120810/65e9b7aa/attachment-0001.html 


More information about the rules-users mailing list