On 27 June 2012 19:23, Davide Sottara <dsotty(a)gmail.com> wrote:
This would be a special case of a dynamic knowledge artifact
(queries,
rules,
processes, etc..) being added to a knowledge base. The "low-level", runtime
addition of an artifact is possible, so it would just need to be exposed in
a more convenient way in the API.
As for a single query, there isn't much you can offload into some
additional API method.
And I think that you have to be careful to use equivalent
KnowledgeBuilders. I haven't
checked this but I think that you can create some inconsistencies by using
a builder
with different options. As it stands now, you can do a dynamic query in
less than 30 LOC.
-W
Another (interesting) option would be to expose this feature at the
KnowledgeAgent level, allowing dynamic, in-memory "(bytearray) resources".
The added valye here is that the KA would ALSO be tracking the "resource"
for modification and removal.
Could you please open a Feature Request JIRA? We'll then discuss it and
implement it.
I have similar use cases and would be happy to sponsor it :)
Davide
p.s. as for the dynamic invocation a query you can do
drools.getWorkingMemory().getQueryResults( ... );
in the RHS of a rule
--
View this message in context:
http://drools.46999.n3.nabble.com/Support-for-dynamic-ad-hoc-queries-in-D...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users