8.2. Commands Supported

Currently, the following commands are supported:
  • BatchExecutionCommand
  • InsertObjectCommand
  • RetractCommand
  • ModifyCommand
  • GetObjectCommand
  • InsertElementsCommand
  • FireAllRulesCommand
  • StartProcessCommand
  • SignalEventCommand
  • CompleteWorkItemCommand
  • AbortWorkItemCommand
  • QueryCommand
  • SetGlobalCommand
  • GetGlobalCommand
  • GetObjectsCommand

Note

In the next snippets code we are going to use a POJO org.drools.compiler.test.Person that has two fields
  • name: String
  • age: Integer

Note

In the next examples, to marshall the commands we have used the next snippet codes:
  • XStream
    String xml = BatchExecutionHelper.newXStreamMarshaller().toXML(command);
  • JSON
    String xml = BatchExecutionHelper.newJSonMarshaller().toXML(command);
  • JAXB
    Marshaller marshaller = jaxbContext.createMarshaller();
    StringWriter xml = new StringWriter();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
    marshaller.marshal(command, xml);