Why and when to perform this task
The process choreographer Web client displays messages for various purposes. Some of these messages require more information to enhance their usability. You can create user-defined JavaServer Pages (JSP) files to display this additional information.
A user-defined JSP that displays messages and more information about these messages receives the message data with the help of the BusinessProcess session bean.
Steps for this task
BusinessProcessService process = MessageUtilities.getBusinessProcessService(request);You can use the BusinessProcessService interface to develop applications that work with both the remote and the local object of the bean.
When user-defined JSP files are called, they receive the ID of the object they are displaying. Call the getParameter method to receive the ID from the HttpServletRequest object. If the JSP file is related to an activity, the activity instance ID (AIID) comes as a string with the HttpServletRequest object. Similarly, JSP files that work with process instances receive the process instance ID (PIID) of the process as a string. You can use the following constants in the calls.
Java name | Usage |
---|---|
BPEL-based processes | |
com.ibm.bpe.portal.util.Constants.WF_AIID | Used in user-defined JSPs for staff activities to access the activity instance ID. Use this ID to retrieve the corresponding com.ibm.bpe.api.ActivityInstanceData objects with the generic API. |
com.ibm.bpe.portal.util.Constants.WF_PIID | Used in user-defined JSPs for receive, pick, or reply
activities to access the process instance ID. Use this ID to retrieve the
corresponding com.ibm.bpe.api.ProcessInstanceData object. This ID is not available
in the following situations:
|
com.ibm.bpe.portal.util.Constants.JSP_OUTPUT_ MESSAGE | Used to retrieve the output message of a non-interruptible process in a user-defined JSP for a receive node. |
V5.0-style processes | |
com.ibm.bpe.client.Constants.WF_AIID | Used in user-defined JSPs for person activities to access the activity instance ID. Use this ID to retrieve the corresponding com.ibm.bpe.api.ActivityInstanceData objects with the generic API. |
com.ibm.bpe.client.Constants.WF_PIID | Used in user-defined JSPs for process instances to
access the process instance ID. Use this ID to retrieve the corresponding
com.ibm.bpe.api.ProcessInstanceData object. This ID is not available in the
following situations:
|
com.ibm.bpe.client.Constants.JSP_OUTPUTMESSAGE | Used for retrieving the output message of a non-interruptible process in a user-defined JSP for a process instance. |
For example, a process output message might have the following structure:
outputMessage | java.lang.String |
flowID | int |
You can access the parts as shown in the following code snippet:
String outputMessage = (String)msg.getObjectPart("outputMessage"); int flowID = msg.getIntPart("flowID");