Analyzing results of a process using the EJB interface

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

  1. Analyze the results of the process:
    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();
    }

Related concepts
Queries on business-process objects in V5.0-style processes



Searchable topic ID:   t6macffe
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/wfapi/tasks/t6macffe.html

Library | Support | Terms of Use | Feedback