Reputation: 1015
i have a List<String>
i want something as below
Rule "List_iterate"
when
$str : String from List<String>
then
// some action of $str
Upvotes: 2
Views: 1099
Reputation: 6322
Using Lists as facts is not a good practice. It is always convenient to use a wrapper class. But if you want to go with the List you could write something like this:
Rule "List_iterate"
when
$list : List() //Be careful, this will match against all the Lists you have in your session.
$str : String() from $list
then
// some action of $str
end
Hope it helps.
Upvotes: 2