JBoss.orgCommunity Documentation

Chapter 11. Drools Commands

11.1. API
11.1.1. XStream
11.1.2. JSON
11.1.3. JAXB
11.2. Commands supported
11.2.1. BatchExecutionCommand
11.2.2. InsertObjectCommand
11.2.3. RetractCommand
11.2.4. ModifyCommand
11.2.5. GetObjectCommand
11.2.6. InsertElementsCommand
11.2.7. FireAllRulesCommand
11.2.8. StartProcessCommand
11.2.9. SignalEventCommand
11.2.10. CompleteWorkItemCommand
11.2.11. AbortWorkItemCommand
11.2.12. QueryCommand
11.2.13. SetGlobalCommand
11.2.14. GetGlobalCommand
11.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: