JBoss.orgCommunity Documentation

Chapter 4. Drools Commands

4.1. API
4.1.1. XStream
4.1.2. JSON
4.1.3. JAXB
4.2. Commands supported
4.2.1. BatchExecutionCommand
4.2.2. InsertObjectCommand
4.2.3. RetractCommand
4.2.4. ModifyCommand
4.2.5. GetObjectCommand
4.2.6. InsertElementsCommand
4.2.7. FireAllRulesCommand
4.2.8. StartProcessCommand
4.2.9. SignalEventCommand
4.2.10. CompleteWorkItemCommand
4.2.11. AbortWorkItemCommand
4.2.12. QueryCommand
4.2.13. SetGlobalCommand
4.2.14. GetGlobalCommand
4.2.15. GetObjectsCommand

XML marshalling/unmarshalling of the Drools Commands requires the use of special classes, which are going to be described in the following sections.

The following urls show sample script examples for jaxb, xstream and json marshalling using:

There are two options for using JAXB, you can define your model in an XSD file or you can have a POJO model. In both cases you have to declare your model inside JAXBContext, and in order to do that you need to use Drools Helper classes. Once you have the JAXBContext you need to create the Unmarshaller/Marshaller as needed.

Currently, the following commands are supported: