322 Moving Forward with the On Demand Real-time Enterprise
This first portlet displays the states of all processes within a specific time interval.
The measure used is Process Instances, which shows how many instances of a
particular process have completed, failed, or are still running. A PresentBlox was
used that shows both the grid and chart of the same data. The number of failed
processes is shown in red, to highlight them. The user can customize the
appearance of reports interactively using the context menu of each report. The
report is shown in Figure 7-32.
Figure 7-32 Process States Portlet
As shown in Example 7-6, the portlet JSP defines a Data Blox that connects to
the cube, retrieves the appropriate data, and then supplies it to the Present Blox,
rendering it using both a Grid and a Chart Blox.
Example 7-6 Example of data and present Blox for displaying process states
<blox:data
bloxName="<%= dataBloxName %>" visible="false" dataSourceName="AuditCube"
query="SELECT DISTINCT({[AuditCube].[Process States].children})ON AXIS(0),
DISTINCT({[AuditCube].[Processes].children})ON AXIS(1)
FROM [AuditCube] where [Process Instances]"
...
</blox:data>
<blox:present visible="false" bloxName="<%=bloxName%>"
id="ProcessStatesBlox">
Chapter 7. The case study 323
<blox:grid><blox:cellFormatforeground="red" scope="{Process
States:FAILED}"/></blox:grid>
<blox:chart title="Process States" chartCurrentDimensions="[AuditCube].
[Processes]" ... />
<blox:data bloxRef="<%=dataBloxName%>" />
...
</blox:present>
It is often useful to show the states of all the activities associated with a particular
process type. You can use interportlet communication to link the process states
reports with the activity states report. We added a hyperlink to each process in
the process states report in order to link to the matching activity states report.
The activity state report shows how many instances of the associated process
activities are in a given state. Figure 7-33 shows the activities states for the Claim
Process.
Figure 7-33 Activity states for the Claim Process
A hyperlink to each process is added by inserting the following code snippet into
the present Blox for the Process States portlet as shown in Example 7-7.
Example 7-7 Insert a hyperlink in a present Blox
<blox:present visible="false" bloxName="<%=bloxName%>"
id="ProcessStatesBlox">
...
<bloxportlet:actionLinkDefinition action="setProcessName">

Get Moving Forward with the On Demand Real-time Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.