[rules-users] Does evaluating two facts of same type in one when condition works?

balachandra maddina chandu2708 at gmail.com
Mon Jul 6 09:33:14 EDT 2009


Thank you for the reply.

2009/7/5 Wolfgang Laun <wolfgang.laun at gmail.com>

> The rule is capable of locating two different facts of type PlaceHolder
> because you wrote it that way: one is supposed to have a field
> value equal to 1, and the other one equal to 2. (Clearly, there cannot
> be one fact where value equals 1 and 2 at the same time.)
>
> Drools (and other rule-based systems) wouldn't be worth a
> farthing if they weren't able to do that ;-)
>
> -W
>
>
> On 7/3/09, balachandra maddina <chandu2708 at gmail.com> wrote:
>
>> Hi There,
>>
>>   Im wondering weather the Following rule would work properly,
>>
>>    rule "abc"
>>
>>      when
>>
>>           a : PlaceHolder(value == 1)
>>           b : PlaceHolder(value == 2)
>>
>>      then
>>       System.out.println("print");
>> .........................
>> workingmemory.insert(placeholderobject1);
>> workingmemory.insert(placeholderobject2);
>> workingmemory.fireAllRules();
>> ..........................................
>>
>> when i tried, the code is working fine, but How can the rule here is able
>> to diffirentiate between two facts of same type? any help would be very much
>> appriciated.
>>
>> Thank you,
>> bala.
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090706/0b998f1e/attachment.html 


More information about the rules-users mailing list