JBoss.orgCommunity Documentation

Chapter 9. Drools Commands

9.1. API
9.1.1. XStream
9.1.2. JSON
9.1.3. JAXB
9.2. Commands supported
9.2.1. BatchExecutionCommand
9.2.2. InsertObjectCommand
9.2.3. RetractCommand
9.2.4. ModifyCommand
9.2.5. GetObjectCommand
9.2.6. InsertElementsCommand
9.2.7. FireAllRulesCommand
9.2.8. StartProcessCommand
9.2.9. SignalEventCommand
9.2.10. CompleteWorkItemCommand
9.2.11. AbortWorkItemCommand
9.2.12. QueryCommand
9.2.13. SetGlobalCommand
9.2.14. GetGlobalCommand
9.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: