<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.2">
</HEAD>
<BODY>
Hello, <BR>
for the first rule, the Jira is <A HREF="https://jira.jboss.org/jira/browse/JBRULES-1929">https://jira.jboss.org/jira/browse/JBRULES-1929</A><BR>
and you have to wait that my patch is applied and you will be able to do all you want<BR>
look at <A HREF="https://jira.jboss.org/jira/secure/attachment/12325575/FinalModification.jpg">https://jira.jboss.org/jira/secure/attachment/12325575/FinalModification.jpg</A><BR>
<BR>
for the second part of you question, did you try with class Double instead of standard type double.<BR>
For example, if a variable is boolean, than no listbox appears. <BR>
But if you use Boolean, then it works, a listbox appears and you can select everything<BR>
regards<BR>
Nicolas Heron<BR>
<BR>
Le jeudi 26 mars 2009 à 12:53 -0700, hpost a écrit :
<BLOCKQUOTE TYPE=CITE>
<PRE>
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
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>