JBoss.orgCommunity Documentation

Chapter 10. Drools Commands

10.1. API
10.1.1. XStream
10.1.2. JSON
10.1.3. JAXB
10.2. Commands supported
10.2.1. BatchExecutionCommand
10.2.2. InsertObjectCommand
10.2.3. RetractCommand
10.2.4. ModifyCommand
10.2.5. GetObjectCommand
10.2.6. InsertElementsCommand
10.2.7. FireAllRulesCommand
10.2.8. StartProcessCommand
10.2.9. SignalEventCommand
10.2.10. CompleteWorkItemCommand
10.2.11. AbortWorkItemCommand
10.2.12. QueryCommand
10.2.13. SetGlobalCommand
10.2.14. GetGlobalCommand
10.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: