Hi.   I am trying to implement the following rule using a guided rule in
Guvnor.  It works successfully in the Eclipse environment.  

rule "SevereHypoglycemia"
        no-loop true
        when
                $event : GlucoseEvent(input.glucoseValue <=
glucoseConst.severeHypoglycemiaThreshold);
        then
                GlucoseResult result = $event.getResult();
                result.setNewInsulin(0);
                double nextTime = glucoseCalc.calculateDuration(1.0,
$event.getInput().getGlucoseValue(), $event.getInput().getGlucoseTime(),
null, null);
                result.setHoursToNextMeasurement(nextTime);
                result.setDextroseGr(0.5);
                result.setNotifyPhysician(true);
                $event.setResult(result);
                update($event);
         
                System.out.println("SevereHypoglycemia rule ran.");
                
end


I have imported the jar file and can see all of the objects.  The problem I
am having is with the nested object model.  I can reference the
GlucoseEvent.input.glucoseValue field successfully, but the only comparison
operators I get are 'equals too' and 'not equals to'.   They type of
glucoseValue is double and I need to do relational comparison as in the rule
above.    If I do a 'View Source' on the rule in BRMS, this is what I see if
I use the 'equals' operator:


rule "Rule1"
        dialect "mvel"
        when
                GlucoseEvent( input.glucoseValue == "40" )
        then
end


Is this bug or does the guided rule editor only support flat object models?

Thanks,

Herman Post

-- 
View this message in context: 
http://www.nabble.com/Guvnor-guided-rule-and-nested-objects-tp22729787p22729787.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to