Hi,<div><br></div><div>I am pocing/learning drools and I am trying to implements Compound Value Restrictions using 'In' in a decision table.</div><div><br></div><div>I can do this in a rule like</div><div><br></div>
<div><div>rule "CoverType Example"</div><div>when</div><div> $risk : Data( coverType in ("A","B", "C", "D"))</div><div>then</div><div> result.add("CoverType was one of A, B C or D");</div>
<div>end</div></div><div><br></div><div>I can also implement this in a decision table in a long winded fashion</div><div>Condition, Action</div><div>Data, result</div><div>coverType, add("$param")</div><div>
<meta charset="utf-8"><div>A, CoverType was one of A, B C or D</div></div><div><meta charset="utf-8"><div>B, CoverType was one of A, B C or D</div></div><div><meta charset="utf-8"><div>C, CoverType was one of A, B C or D</div>
</div><div><meta charset="utf-8"><div>D, CoverType was one of A, B C or D</div></div><div><br></div><div>Is there a compact way to do this using a Compound Value Restriction using in?</div><div>Something like:</div>
<div><br></div><div><meta charset="utf-8"><div>Condition, Action</div><div>Data, result</div><div>coverType in, add("$param")</div><div><div>"A,B,C,D", CoverType was one of A, B C or D</div>
</div><div></div></div><meta charset="utf-8"><div><br></div><div>What goes in the script part "coverType in"?</div><meta charset="utf-8"><div><br></div><div>The number of items in the list can be variable, so don't want to write something that has $1, $2, $3, $4</div>
<div><br></div><div>Thanks</div><div>David</div>