342 Improving Business Performance Insight
String shipper = message.substring(message.indexOf(
<h3>Change Shipper</h3>
Please enter the new shipper.
<FORM method="POST"
<INPUT class="wpsEditField" name="<%=HumanTaskWebPortlet.TKIID %>"
value="<%=tkiid%>" type="hidden"/>
<LABEL class="wpsLabelText" for="currentShipper">
Current Shipper:&nbsp;
<INPUT class="wpsEditField" name="currentShipper" value="<%=shipper%>"
<LABEL class="wpsLabelText" for="newShipper">New Shipper</LABEL>
<INPUT class="wpsEditField" name="newShipper" value="" type="text"/><BR>
<INPUT class="wpsButtonText" name="
<portletAPI:encodeNamespace value='<%=HumanTaskPortlet.SUBMIT%>'/>"
value="Complete" type="submit"/>
8.6.2 Alphablox portlets: Looking for the root cause
In this section, we describe how to implement a custom Alphablox portlet and
how it can cooperate with other portlets. In Figure 8-49 on page 343, we illustrate
the Alphablox portlets and their interactions. In the last section, we described the
My Tasks portlet and how it sends messages with the product group to the other
portlets. Now we describe how the Alphablox portlets will receive the
parameters, how the Alphablox portlets are built, and how they cooperate with
each other.
Note: It is possible that you might have problems deploying the portlet,
because the path to the wsdl file is too long for a Windows system to handle. If
so, you need to shorten the names of the files that Rational Application
Developer created.
Chapter 8. Performance insight case study implementation 343
Figure 8-49 Alphablox portlets
Basic Alphablox portlet setup
We built the custom Alphablox portlet using Rational Application Developer
V6.0.1, before we started building the portlet to make sure the Alphablox
Rational Application Developer plug-in is installed and Alphablox is installed into
the Rational Application Developer test environment. For more information, refer
to the Information Center:
Next, create a new portlet project. In this case, we use the IBM portlet. You can
also use a JSR168 portlet, but some of the API calls are slightly different. In the
Web perspective of Rational Application Developer, select File New
Portlet Project. The steps to create a new portlet project are:
1. Enter a name for the portlet, for example, Alphablox
, and make sure you
WebSphere Portal V5.1.
2. Click Next and select the Basic Portlet, then click Next and check DB2
Alphablox Content under Features. This will include the Alphablox libraries
into the project for java completion and tag completion.
3. Then click Next two times and you get to the Event Handling options. Under
Portlet message event, check both Add message listener
and Add
message sender portlet sample. This will allow the portlet to listen to
messages, which you will need when a message gets sent from the My Tasks
portlet to this portlet, to slice the data according to the product group.
4. Click Next two times and you get to the Miscellaneous window, check Add
edit mode. Use the edit mode to configure the Alphablox portlet. Last, click
1. Double-click on the
Intersection of the data
that has the problem
2. Data gets sliced
according to the data
Blox to Blox Communication
344 Improving Business Performance Insight
If you forget to check the DB2 Alphablox Content option, then you can
right-click the project and select Properties. In the Properties dialog, select Web
Project Features and check DB2 Alphablox Content.
To create a basic Alphablox portlet, you need to add three parts to the portlet
view jsp (AlphabloxportletView.jsp):
1. Alphablox tag libraries to the top of the jsp page. This will allow the servlet
engine to resolve the Alphablox tags.
<%@ taglib uri="bloxtld" prefix="blox"%>
<%@ taglib uri="bloxuitld" prefix="bloxui"%>
<%@ taglib uri="bloxportlettld" prefix="bloxportlet"%>
2. The header tag, which is required, because it will include the JavaScript client
API and reference to the style sheets.
3. A visible blox, for example, PresentBlox. We will separate the DataBlox from
the PresentBlox and have a separate Display blox. This will make the portlet
slightly more flexible for extensions of the portlet.
query="select from [QCC]"/>
<blox:data bloxRef="dataBlox"/>
<DIV style="margin: 6px">
<table width="100%" cellpadding="0" cellspacing="0">
width="100%" />
4. At this point, you can test the portlet. And, assuming you have the QCC
sample database setup and created, the data sources in the Alphablox admin
pages. You will see a basic blox in the portlet with a default query.

Get Improving Business Performance Insight . . . with Business Intelligence and Business Process Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.