Yes, best to accumulate "evidence" for a rejection like this. Even though, in that case, you only really need one rule to fire, its better from a business rules stand point to have "stronger" evidence as to why some outcome was decided by engine.

Sure enough, one of your users will ask basically the same question you did. If you build you object model to accumulate the evidence, you can proudly show them 2 reasons why their claim is rejected (and also the irate patient).

And you CRUEL PERSON, rejecting a claim cause they spent too much time in hospital ;)


Michael.

On 10/19/06, Steven Williams < [EMAIL PROTECTED]> wrote:
Without salience you can't know which rule will fire first and from the looks of your results checkClaim2 is firing first. If you add the " clm.getReason() + " to checkClaim you may get what you want. I would suggest changing your reason property to a list of reasons and then in each rule just do clm.addReason().

cheers
Steve


On 10/19/06, Joj < [EMAIL PROTECTED]> wrote:


rule "checkClaim"

        when
                clm : Claim(typeId == 1)
                clm : Claim(amount > 10000.00)

        then
                clm.setStatus("REJECTED");
                clm.setReason("amount claimed exceeds the maximum permitted");
end


rule "checkClaim2"

        when
                clm : Claim(typeId == 1)
                clm : Claim(daysInHospital > 50)

        then
                clm.setStatus("REJECTED");
                clm.setReason(clm.getReason() + "    more nights in hospitals than the
maximum permitted");
end



This is the code in my drl file. suppose the factObject of Claim satisfies
both the rules (we can't give the same name for muntiple rules in drl, rt?
but can't we do it in .xls?).  but i'm getting reason as "amount claimed
exceeds the maximum permitted". y it's so? i expected "amount claimed
exceeds the maximum permitted    more nights in hospitals than the maximum
permitted".

thanx in advance
jojan


--
View this message in context: http://www.nabble.com/propagation-of-object-thru-rules-tf2471502.html#a6891107
Sent from the drools - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

     http://xircles.codehaus.org/manage_email




--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference

Reply via email to