Hello,

I am having trouble a rule that has multiple objects on the LHS of a rule.

Here is the rule:
(defrule maturity-breakdown
  (matBreakdown
          (_lt_1_MktVal       ?__lt_1_MktVal)
          (_btw1_5_MktVal     ?__btw1_5_MktVal)
          (_btw5_10_MktVal    ?__btw5_10_MktVal)
          (_btw10_20_MktVal   ?__btw10_20_MktVal)
          (_btw20_30_MktVal   ?__btw20_30_MktVal)
          (_gt_30_MktVal      ?__gt_30_MktVal)
          (OBJECT        ?matBreakDown))

  (credit
          (TIER_1_MKT_VAL          ?__TIER_1_MKT_VAL) )

    =>

      (printout t "****JESS ENGINE**** started maturity-breakdown" crlf)
      (printout t "****JESS ENGINE**** ?__lt_1_MktVal  " ?__lt_1_MktVal " ***" crlf)
      (printout t "****JESS ENGINE**** CREDIT:?__TIER_1_MKT_VAL  " ?__TIER_1_MKT_VAL " 
***" crlf)
      (printout t "****JESS ENGINE**** ?__lt_1_MktVal  " ?__lt_1_MktVal " ***" crlf)
**************************************************************************************************************
Here is the java code:
........
          Rete rete = new Rete();
          rete.addUserpackage(new MiscFunctions());
          rete.addUserpackage(new jess.ReflectFunctions());

           // Read in the rules
          rete.executeCommand("(batch \"/rules/rules.clp\")");
          rete.executeCommand("(reset)");

          // Import objects into JESS
          Funcall f = new Funcall("definstance", rete);
          f.add(new Value("matBreakdown", RU.ATOM));
          f.add(new Value(matBreak));
          f.add(new Value("static", RU.ATOM));
          f.execute(rete.getGlobalContext());

          f = new Funcall("definstance", rete);
          f.add(new Value("credit", RU.ATOM));
          f.add(new Value(credit));
          f.add(new Value("static", RU.ATOM));
          f.execute(rete.getGlobalContext());

               rete.executeCommand("(run)");
.........
**************************************************************************************************************

I get the following output:

****JESS ENGINE**** started maturity-breakdown
****JESS ENGINE**** ?__lt_1_MktVal  
<External-Address:jess.SerializablePropertyDescriptor> ***
****JESS ENGINE**** CREDIT:?__TIER_1_MKT_VAL  2.3066504E7 ***
****JESS ENGINE**** ?__lt_1_MktVal  
<External-Address:jess.SerializablePropertyDescriptor> ***
****JESS ENGINE**** completed maturity-breakdown


The problem is in line 2.  The variable " ?__lt_1_MktVal" should evaluate to a number. 
 Instead, JESS
responds with: "External-Address:jess.SerializablePropertyDescriptor".  The really 
strange thing is that if  I have
one rule for each object separately everything works fine.  I saw the previous msg. 
about a similar problem where
an exception was being thrown and that is not the case here.  There are no exceptions 
being thrown.  Also, I can sucessfully
call the in question methods of the object  via java code (on the same instance of the 
object that is passed into jess) before
and after passing the object into JESS.  For some reason JESS cannot access the object 
in question.  Furthermore this is
not isolated to one object in particular.

Does anybody have any ideas???


Thanks,

-Marijan



---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to