Show Table of Contents
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>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.