[rules-users] Test if String endsWith()

cheikh dhib dhib.cheikh at gmail.com
Wed Nov 14 05:36:43 EST 2012


I think you can reformulate it as follows :

rule "Check the items of the list and remove the ones that satisfy the
condition"
lock-on-active
when
$wrapper : Wrapper(
id == "itemId",
$items : list)
$wrapper.getEmail().endsWith("@email.com")
$item : Map() from $items
then
$items.remove($item)
end
-

Le 13/11/2012 09:02, Wolfgang Laun a écrit :
> rule "Check the items of the list and remove the ones that satisfy the
> >>  condition"
> >>       lock-on-active
> >>  when
> >>       $wrapper : Wrapper(
> >>                   id == "itemId",
> >>                   email.endsWith("@email.com") == true,
> >>                   $items : list)
> >>       $item    : Map() from $items
> >>  then
> >>       $items.remove($item)
> >>  end
> >>  ----



More information about the rules-users mailing list