Process initiation helper classes

A process initiation helper class is generated when you create a business process portlet with the Add process initiation option available in the New Portlet Project wizard or New Portlet wizard. The class is included in a JAR file (portlet-bp.jar for the JSR 168 API or wp-portlet-bp.jar for the IBM® portlet API) that is copied into /WEB-INF/lib in the process initiation portlet project.

A helper class encapsulates the common code for process initiation portlets. There are two helper classes, depending on which portlet API that you choose, but the only differences are the portlet API types, such as PortletRequest.

The helper classes provide the following methods to be called from the process initiation portlets:
Table 1. Process initiation helper methods
Method Description
public void init()

This method initializes a business process interface.

public void setTemplate(PortletRequest request, String name)

This method creates a business process input message using the specified template name, and stores it in a session attribute (PROCESS_INPUT_MESSAGE).

The map interface for the input message is stored in a session attribute, so that get() and put() methods can be used to get/set message parts.

public void initiateProcess()

This method initiates a business process using the template name specified in setTemplate(), and the input message in the session attribute.

EJB reference mapping

The process initiation helper requires the following EJB reference, which is automatically generated in web.xml by the New Portlet Project wizard and the New Portlet wizard:
<ejb-ref>
    <ejb-ref-name>ejb/BusinessProcessHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.ibm.bpe.api.BusinessProcessHome</home>
    <remote>com.ibm.bpe.api.BusinessProcess</remote>
</ejb-ref>
You must map this reference to the JNDI name of the deployed EJB on your target portal server.
Related concepts
Task processing helper classes
Related tasks
Creating a business process portlet project
Developing business process portlets
Related reference
WebSphere Portal Documentation Library
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.