I've got a fact which contains a collection (a set of strings to be
precise). I want to write a rule which fires if there are any invalid
values (where the valid values are defined as a list).
What I'm trying to do is express this within a decision table.
Expressed as a drl rule the following works:
rule "ValidateList"
when
Fact(col : collection != null)
String(this not in ($param)) from col
Then
#generate error
End
Where $param = '"1", "3", "valid"'
The decision tables seem to assume that the fact type is the last
element in the line and then appends "( conditions... )" this means
there is no way to then insert a "from ..." after it.
Does anybody know either a different way to structure the rule so that I
don't need a from or a way to get the decision table to use it?
(unfortunately adding the collection directly as a fact isn't an
option).
Thanks,
Thomas
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************
Show replies by date