Runtime tools : Core components : Flows : Tasks : Using a flow processor : Determining whether a process executed successfully
  
Determining whether a process executed successfully
To determine whether a processor executed successfully, you can obtain the value of the typeIdInfo of the final state. This value declares how the processor finished and allows you to handle the result accordingly.
For example, say you have a processor with the following definition:
<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();
Go up to
Using a flow processor