In the Drools Integration User Guide there is an example to create XML
commands which can be used with Drools Server.
The documentation of the GetObjectsCommand specifies that you can set an
ObjectFilter to filter the objects returned:
GetObjectsCommand
<
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-integration-d...
However, the documentation does not specify the format that must be used to
include the ObjectFilter.
I have tried creating an XML directly from a GetObjectsCommand object using
Xstream which results in the following XML command:
*<org.drools.command.runtime.rule.GetObjectsCommand>
<filter class="org.drools.runtime.ClassObjectFilter">
<clazz>com.sample.models.EstadoInformacional</clazz>
</filter>
</org.drools.command.runtime.rule.GetObjectsCommand>
*
Which is different from the xml format used in the User Guide. The command
works well with Drools Server, but it doesn't filter objects:
*<?xml version='1.0'
encoding='UTF-8'?><execution-results><result
identifier="objects"><list><com.sample.models.Rol><rol>rol1</rol></com.sample.models.Rol><com.sample.models.EstadoInformacional><id>id1</id></com.sample.models.EstadoInformacional></list></result></execution-results>
*
I have also tried to modify the command used in the Drools User Guide
without success:
*<batch-execution lookup="ksession1">
<get-objects out-identifier="objects">
<org.drools.runtime.ClassObjectFilter>
<clazz>com.sample.models.EstadoInformacional</clazz>
</org.drools.runtime.ClassObjectFilter>
</get-objects>
</batch-execution>*
So my question is: What is the format to use an ObjectFilter with the
GetObjectsCommand?
--
View this message in context:
http://drools.46999.n3.nabble.com/Using-GetObjects-command-with-ObjectFil...
Sent from the Drools: User forum mailing list archive at
Nabble.com.