[rules-users] Is "or" allowed in a rule? Can I link the rules?

Yu Wang yuwarm at gmail.com
Thu Jul 24 12:43:33 EDT 2008


Thank you so much for the quick reply! Guess I need to study the
documentation more thoroughly.
When I say "explode", I mean I have to use many rules to represents 1
business rule expressed in human language. I believe the problem can be
solved if the two questions in my last email are solved. Thanks again,
Ingomar.


On 7/24/08, Ingomar Otter <iotter at mac.com> wrote:
>
> >1. Seems to me that the conditions in a rule are always connected with
> "AND" relation:
> True.
> AND is the default.
>
> >Is "or" allowed? I mean , can I express:  "if (C1 or C2 or C3) and C4,
> then D1" in 1 rule?
> You can have an explicit OR,  see section 6.5.2.3 of the 4.0.7
> documentation.
>
> >Can I form a link of rules? Can rule A's decision (the Then part) be rule
>> B's condition (The When part)?
>>
>> >for instance:
>> >rule A: if C1, C2, C3 then D1
>> >rule B: if D1, C4 then D2
>>
> usually the consequence (RHS) of would modify facts which you can test in
> rule B.
> A common way is to assert a fact.
>
> >When the complexity increases, the number of rules explodes.
> What's your definition of "explodes"? This suggest that you should have
> another go at your rule/fact model.
>
> Cheers,
>  --Ingomar
>
>
> Am 24.07.2008 um 17:25 schrieb Yu Wang:
>
>  I'm a beginner user of Jboss, please bear with my maybe dumb questions:
>>
>> 1. Seems to me that the conditions in a rule are always connected with
>> "AND" relation:
>>
>> such as the following rule
>>
>> if C1
>>  C2
>>  C3
>> then D1
>>
>> it means "if C1 and C2 and C3, then D1"
>>
>> Is "or" allowed? I mean , can I express:  "if (C1 or C2 or C3) and C4,
>> then D1" in 1 rule?
>>
>> Right now, I can only use 3 rules to express it:
>>
>> if C1
>>  C4
>> then D1
>>
>> if C2
>>  C4
>> then D1
>>
>> if C3
>>  C4
>> then D1
>>
>>
>> 2. Can I form a link of rules? Can rule A's decision (the Then part) be
>> rule B's condition (The When part)?
>>
>> for instance:
>> rule A: if C1, C2, C3 then D1
>> rule B: if D1, C4 then D2
>>
>>
>> When the complexity increases, the number of rules explodes.
>> I browsed the document and didn't find a clue. I'm using the 4.0.7.
>> Your help is highly appreciated.
>>
>>
>> _______________________________________________
>> 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/20080724/73ab589f/attachment.html 


More information about the rules-users mailing list