Я пытаюсь так
Код: Выделить всё
rule "valid product type-subtype rule"
salience 700
when
$paramMap : DrlParams()
// Extract as Object since this is what works for you
$list : List() from $paramMap.getList("productTypeSubtype")
// Bind your record and fields
$t : TradePositionRecord( $pt : productType, $pst : productSubType )
// Explicitly cast to java.util.List inside the eval
eval( ((List)$list).contains($pt + "," + $pst) )
then
System.out.println("Match found!");
end
- DrlParams вставлен как факт.
- Он содержит список строк в ключе карты ProductTypeSubType
Подробнее здесь: https://stackoverflow.com/questions/798 ... -in-drools