[rules-users] Package parameters

Anstis, Michael (M.) manstis1 at ford.com
Thu Jun 26 10:48:23 EDT 2008


Hi,

I don't think Drools supports this directly, but would this not be as
accomplishable with DSL?

Your Drools rule could then be written something like this (bare in mind I'm
no DSL expert):-

DSL:

[when]There is a hemoglobin lab result with=LabResult(type==hemoglobin)
[when]- a value less than {v}=value<{v}

Rule: 

There is a hemoglobin lab result with
- a value less than 42

With kind regards,

Mike 

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Yoni Mazar
Sent: 26 June 2008 15:29
To: rules-users at lists.jboss.org
Subject: [rules-users] Package parameters


Hi all,
We are at the begining of a new clinical decision-support project. We are
considering using a BRMS to manage and execute our business logic. As part
of our research, we evaluated JRules and Drools. JRules has a nice feature
that we could not find in Drools. We'd like to know if we are
misunderstanding something, or maybe this feature is missing.

In JRules, one can define a ruleset (corresponds to a package) with
parameters. Each parameter has a datatype (a class), a direction
(in/out/inout), and an alias. Then, within the rules, the user can refer to
the parameter alias. For example, a user can define a ruleset with the
following parameters: 
*class=LabResult, direction=in, alias=hemoglobin
*class=LabResult, direction=in, alias=creatinin
Then, within a rule, one can write:
when hemoglobin.value<10 and creatinin.value>34
then...
Now, the application retrieves the patient data accordingle (hemoglobin and
creatinine data separetly) and sets the ruleset parameters:
ruleset.parameters.add("hemoglobin",hemoglobinFact)
ruleset.parameters.add("creatinin",creatininFact)

This approach simplifies the rule authoring process significantly!

Writing this logic in Drools will be:
package cdss
import LabResult;

rule
when 
LabResult(type=hemoglobin && value <10)
LabResult(type=creatinin&& value <34)
then...

workingMemory.Assert(hemoglobinFact);
workingMemory.Assert(creatininFact);

Does someone has an idea how to bridge this gap using Drools?
Im not sure if using parameters JRule complies with JSR94 specification.

Thanks,
Yoni
-- 
View this message in context:
http://www.nabble.com/Package-parameters-tp17979190p17979190.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7206 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080626/89c368d8/attachment.bin 


More information about the rules-users mailing list