Argh...Sorry, wrong key too early...here's the full changes:
rule "Combine ODMAnswers"
when
$list : List( )
$a1:ODMAnswer( some check ) from $list
$a2:ODMAnswer( assuming something making this one different than
$a1 ) from $list
then
$list.add(new ODMAnswer( ));
$list.remove($a1);
$list.remove($a2);
end
On Wed, Jan 16, 2013 at 10:47 AM, Jeremy Ary <jeremy.ary(a)gmail.com> wrote:
Try this;
rule "Combine ODMAnswers"
when
$a1:ODMAnswer( some check )
$a2:ODMAnswer( assuming something making this one different than
$a1 )
eval(odmList contains $a1 && odmList contains $a2)
then
ODMAnswer answer = new ODMAnswer( );
odmList.add(answer);
odmList.remove($a1);
odmList.remove($a2);
end
On Wed, Jan 16, 2013 at 10:41 AM, Bojan Janisch <
bojan.janisch(a)scai.fraunhofer.de> wrote:
> rule "Combine ODMAnswers"
>
> when
> $a1:ODMAnswer( )
> $a2:ODMAnswer( )
>
> eval(odmList contains $a1 && odmList contains $a2)
> then
> ODMAnswer answer = new ODMAnswer( );
> odmList.add(answer);
> odmList.remove($a1);
> odmList.remove($a2);
> end
>