Hmm,
Am i doing something wrong here then,
I have this code on the RHS:
--
(bind ?effRate (ognl-get ?pdLocation "getEffectivePerDiemRate(#date)" "date"
?pddate))
(if (eq ?effRate nil) then 
        ;;(dts-log-error "No effective rate found for " (call
com.ngc.dts.util.DateUtils formatDateTime ?pddate))
         return )
    (bind ?expense (get-pde-expense ?entObj "mealsAndIncidentalsExpense"))
    (set ?expense allowedCost (?effRate getCommercialMealRate))
--

But I am still getting this error:
--
Exception:      JessException
Message:        Can't call method on nil reference: getCommercialMealRate
In Class:       jess.de
In Method:      call() : null : -1

Jess reported an error in routine call
        while executing (call ?effRate getCommercialMealRate)
        while executing (set ?expense allowedCost (call ?effRate 
getCommercialMealRate))
        while executing defrule MAIN::assign-cmr.
--

The (if (eq ..)) test does not seem to resolve to true, and the (call) on the
nil ?effRate variable is still executed.

Am I doing something wrong here ?




On Wed, 11 Jan 2006 11:30:12 -0800 (PST), ejfried wrote
> I think erich.oliphant wrote:
> 
> > I need to make sure that ?objVal is not nill before proceeding further. I
> > don't see any functions that might help me here. (if (eq ..)) doesn't work
> > since it's going to try to call Object.equals(). 
> 
> Actually, "eq" works fine.
> 
> ---------------------------------------------------------
> Ernest Friedman-Hill  
> Advanced Software Research          Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> PO Box 969, MS 9012                 [EMAIL PROTECTED]
> Livermore, CA 94550         http://herzberg.ca.sandia.gov
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------

--------------------------------------------------------------------
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