<processor id="processName" cleanEventsQueueOnSwitch="true|false" context="processNameCtxt"> ... <!-- states --> ... <state id="finalOk" type="final" typeIdInfo="ok" /> <state id="finalNotOk" type="final" typeIdInfo="notOk" /> </processor>
The following code launches the processor and gathers the typeIdInfo of the final state:
// Get the processor from the external definition Processor proc = (Processor) DSEProcessor.readObject("procName"); // Run the processor proc.execute(); // Get the typeIdInfo corresponding with the final state String result = proc.getCurrentState().getTypeIdInfo(); if (result.equals("ok")){ // do whatever } else if (result.equals("notOk")) { // do whatever else } // close the processor to free up resources proc.close();