I think Jerome Butchergreen wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Thanks again Alan and I understand what your saying,
> but the fields where the blank values will be unknown.

You need to think clearlt about what you're trying to accomplish. I
think on reflection you'll realize that you've got some logical
loopholes. Here is the rule you're trying to write:

(defrule run-service
   ?inputservice <- (inputservice ?service ?project
                                  ?org ?analystname ?analystrole
                                  ?priority ?reldatetime ?location)
   ?newserv <- (webservice (service ?service) (project ?project)
                           (org ?org) (analystname ?analystname)
                           (analystrole ?analystrole) (priority ?priority)
                           (reldatetime ?reldatetime) (location ?location)
                           (action run) )
  =>
  (store RETURN "run")
  (printout t "JESS: Found an existing service = " ?service crlf)

Now, what this rule says is that if there are an inputservice fact and
a webservice fact, and all of the data in the ordered inputservice
fact matches the contents of the webservice fact exactly, then the
rule should fire.

What you're saying is that maybe the inputservice fact will contain
some nil values, and you want the rule to still fire. First, consider
the corner case: what if all the values in inputservice are nil?
Should the rule match? I suspect not.

Now, what if "service" is nil, but all the others match. Should the
rule fire? I suspect not, although I don't know for sure. So there are
some fields that *must* match, and some that don't need to. If they
don't need to, why check them at all? Why not just check the ones that
must match? Why not write, for example, 

(defrule run-service
   ?inputservice <- (inputservice ?service ?project ?org ? ? ? ? ?)
   ?newserv <- (webservice (service ?service) (project ?project)
                           (org ?org) (action run))
  =>
  (store RETURN "run")
  (printout t "JESS: Found an existing service = " ?service crlf)

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

Reply via email to