Why and when to perform this task
An interruptible process runs asynchronously. Its output message is not automatically returned when the process completes. The message must be retrieved explicitly. The results of the process are stored in the database only if the process template from which the process instance was derived does not specify automatic deletion of the output message.Steps for this task
QueryResultSet result = process.query("PROCESS_INSTANCE.PIID", "PROCESS_INSTANCE.NAME = 'CustomerOrder' AND PROCESS_INSTANCE.STATE = PROCESS_INSTANCE.STATE.STATE_FINISHED", null, null, null); if (result.size() > 0) { result.first(); PIID piid = (PIID) result.getOID(1); ClientObjectWrapper output = process.getOutputMessage(piid); OrderNo order = (OrderNo) output.getObject(); }