A participating or purely human task runs asynchronously. Its output message is not automatically returned when the task completes. 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: Mon Mar 27 18:04:06 2006
(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)