Hello everybody:

I have two question related to queries:

First one, the one in the subject, I have a query which retrieves facts
which have to be modified and updated in working memory. I've seen that
the StatefulKnowledgeSession.update() method has the fact handle as input.
Is it possible to set the fact handle to null? If it isn't, how can I get
the fact handle using the fact retrieved with the query?

Second one, related to writing, I though of parameterizing the query using
the fact pattern, something like this,

query "alarmExists"  (AlarmFact key)
    $alarm : AlarmFact(key1 == key.key1,
                   key2 == key.key2,
                   key3 == key.key3
                   )

end



but the rule compiler doesn't accept this sintax. Is it a requirement that
query parameters are basic java types or is there a way to write this query
using more complex Object parameters?

Thank you for your time.

Best Regards,

Manuel Ortiz.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to