-
Language:
English
-
Language:
English
9.15. Execution Marshalling Examples
This is an example of BatchExecution marshalled to XML
<batch-execution>
<insert out-identifier="sedan">
<org.drools.Car>
<type>sedan</type>
<price>1</price>
<oldPrice>0</oldPrice>
</org.drools.Car>
</insert>
<query out-identifier='cars2' name='carsWithParams'>
<string>hatchback</string>
<string>sedan</string>
</query>
</batch-execution>
The
CommandExecutor returns an ExecutionResults, and this is handled by the pipeline code snippet as well. A similar output for the <batch-execution> XML sample above would be:
<execution-results>
<result identifier="sedan">
<org.drools.Car>
<type>sedan</type>
<price>2</price>
</org.drools.Car>
</result>
<result identifier='cars2'>
<query-results>
<identifiers>
<identifier>car</identifier>
</identifiers>
<row>
<org.drools.Car>
<type>hatchback</type>
<price>2</price>
<oldPrice>0</oldPrice>
</org.drools.Car>
</row>
<row>
<org.drools.Car>
<type>hatchback</type>
<price>1</price>
<oldPrice>0</oldPrice>
</org.drools.Car>
</row>
</query-results>
</result>
</execution-results>