Fork me on GitHub
#clara
<
2016-08-22
>
ramji01313:08:48

Hi All, I have posted my query in different group instead Clara. Anyone in the group please help to look into this. regarding 2nd question, we have found the answer. response type of queryString() from QueryResult is Object type, that can be typecasted to respective object. https://clojurians.slack.com/archives/clojurescript/p1471836222005217

ryanbrush15:08:30

Hi @ramji013, if you're having a specific issue the best way to troubleshoot is to post a minimal runnable example that shows the problem you're having, possibly as a gist or issue on github. def'd variables should be visible from within rules; we do it frequently. If you're doing something in ClojureScript I'm less sure, since I haven't used that in earnest.

ryanbrush15:08:12

As for getting to nested fields, you can use Clojure's destructuring to get to the top-level field (or fact itself), and then access nested fields just using Clojure expressions as part of the rule left-hand side. Some details on restructuring are here: http://www.clara-rules.org/docs/expressions/

ryanbrush15:08:27

An announcement: Clara 0.12.0 has been released! There have been a bunch of performance enhancements from @wparker and @mikerod, and a handful of bug fixes as well. Details are in the change log: https://github.com/rbrush/clara-rules/blob/master/CHANGELOG.md#0120