[rules-users] Inserting Different Objects Of Same Class !
Wolfgang Laun
wolfgang.laun at gmail.com
Tue Nov 27 01:47:40 EST 2012
You'll have to add the information that isn't available with an
anonymous fact object, i.e., a name tied to a reference.
class NameFact {
String name;
Object fact;
...
}
To identify any fact that hasn't an id in its contents:
(a) via a name
when
NameFact( name == "Chebyshev", $fact: fact )
List( this == $fact,... )
(b) via the fact
when
$list: List( size == 0 )
NameFact( $name: name, fact == $list )
then
x.println( $name + " is empty" );
-W
On 27/11/2012, abhinay_agarwal <abhinay_agarwal at infosys.com> wrote:
> hey,
>
> I have 3 different ArrayList which i need to populate under different
> circumstances.
>
> I can insert 3 different arraylist(differentiated by there names) but in
> drools enviroment, how m i suppossed to differentiate them??
>
> Regards,
> Abhinay
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Inserting-Different-Objects-Of-Same-Class-tp4020971.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list