<br><br><div class="gmail_quote">On 27 June 2012 19:23, Davide Sottara <span dir="ltr">&lt;<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This would be a special case of a dynamic knowledge artifact (queries, rules,<br>
processes, etc..) being added to a knowledge base. The &quot;low-level&quot;, runtime<br>
addition of an artifact is possible, so it would just need to be exposed in<br>
a more convenient way in the API.<br></blockquote><div><br>As for a single query, there isn&#39;t much you can offload into some additional API method.<br>And I think that you have to be careful to use equivalent KnowledgeBuilders. I haven&#39;t<br>
checked this but I think that you can create some inconsistencies by using a builder<br>with different options. As it stands now, you can do a dynamic query in less than 30 LOC.<br><br>-W<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Another (interesting) option would be to expose this feature at the<br>
KnowledgeAgent level, allowing dynamic, in-memory &quot;(bytearray) resources&quot;.<br>
The added valye here is that the KA would ALSO be tracking the &quot;resource&quot;<br>
for modification and removal.<br>
<br>
Could you please open a Feature Request JIRA? We&#39;ll then discuss it and<br>
implement it.<br>
I have similar use cases and would be happy to sponsor it :)<br>
Davide<br>
<br>
p.s. as for the dynamic invocation a query you can do<br>
drools.getWorkingMemory().getQueryResults( ... );<br>
in the RHS of a rule<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Support-for-dynamic-ad-hoc-queries-in-Drools-tp4018281p4018301.html" target="_blank">http://drools.46999.n3.nabble.com/Support-for-dynamic-ad-hoc-queries-in-Drools-tp4018281p4018301.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>