Hi all - I'm just getting started with Drools and trying to get my first
query running through Camel-Server using XML. I had expected that a query
would return the objects found, with their attributes as XML elements but I
only get an identifier.
The query is
query "depositAccept"
dA: DepositAccept();
end
DepositAccept is defined in java as
public class DepositAccept {
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
In my XML batch execution command I have
<batch-execution lookup="ksession2">
<insert out-identifier="person1">
<samples.banking.Deposit>
<accountNumber>1</accountNumber>
<amount>1001</amount>
</samples.banking.Deposit>
</insert>
<fire-all-rules max="-1"/>
<query name="depositAccept" out-identifier="person2"/>
</batch-execution>
which gives me the response
<execution-results>
<result identifier="person1">
<samples.banking.Deposit>
<accountNumber>1</accountNumber>
<amount>1001</amount>
</samples.banking.Deposit>
</result>
<result identifier="person2">
<query-results>
<identifiers>
<identifier>dA</identifier>
</identifiers>
</query-results>
</result>
<fact-handle identifier="person1"
external-form="0:1:1485038299:1485038299:1:DEFAULT:NON_TRAIT"/>
</execution-results>
I take that to mean that "dA" exists (i.e. the query returns one object) but
I would have expected then to have the "message" attribute shown from the
DepoistAccount object that dA refers to. Is that possible ?
thanks
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-6-0-0-Camel-server-query-results...
Sent from the Drools: User forum mailing list archive at
Nabble.com.