A participating or purely human task runs asynchronously. If a reply handler is specified when the task starts, the output message is automatically returned when the task completes. If a reply handler is not specified, the message must be retrieved explicitly.
The results of the task are stored in the database only if the task template from which the task instance was derived does not specify automatic deletion of the derived task instances.
The example shows how to check the order number of a successfully completed task.
QueryResultSet result = task.query("DISTINCT TASK.TKIID", "TASK.NAME = 'CustomerOrder' AND TASK.STATE = TASK.STATE.STATE_FINISHED", null, null, null); if (result.size() > 0) { result.first(); TKIID tkiid = (TKIID) result.getOID(1); ClientObjectWrapper output = task.getOutputMessage(tkiid); DataObject myOutput = null; if ( output.getObject() != null && output.getObject() instanceof DataObject) { myOutput = (DataObject)output.getObject(); int order = myOutput.getInt("OrderNo"); } }
Last updated: Tue Dec 06 04:14:42 2005
(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)