Creating JSP files for displaying messages

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

  1. Make the BusinessProcess bean available to the JSP file.
    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.
  2. Receive the input or output messages of the process or activity using either the getInputMessage or the getOutputMessage method.

    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.


    Constants that can be used in calls to JSP files
    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:
    • Before a process instance starts
    • For user-defined JSPs for the reply activity of a non-interruptible process
    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:
    • Before a process instance starts
    • For user-defined JSPs for the reply activity of a non-interruptible process
    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.


  3. Access the message parts.

    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");



Searchable topic ID:   t7jspmsg
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/wfclient/tasks/t7jspmsg.html

Library | Support | Terms of Use | Feedback