IBM® WebSphere® Process Server’s Business Process Choreographer (hereafter known as BPC Explorer) is a Web-based user interface used to manage and view business process instances and human tasks. The BPC Explorer provides default views for both process instances and human tasks. In certain instances, some of the default views can potentially return a large number of process instances or human tasks and create unwanted load on the server and cause performance degradation.
With BPC Explorer, you can create custom views. In this article, you will learn how to create custom views to return specific process instances or human tasks, there by reducing load on the server.
Important: The techniques described in this paper were tested on WebSphere Process
Server V6.0.2.
This article is primarily intended for WebSphere Process Server administrators and architects.
Defining a custom process instance view
A custom view is a user-defined view. Think of it as a custom query that you want to build to return specific process instances that you are interested in. In this section, we will show how to define a custom view.
- Login to the BPC Explorer.
-
Click Define Views link at the top of the page and then click Search And Define
Views For Process Instances link in the resulting page. You should see the following
page:
Figure 1. Define a custom view
- As you can see in the above picture, you can specify name for the custom view and other properties (in different tabs). As you might have already observed, this is similar to specifying WHERE clause of a SQL query. We are not going to describe each and every option available as these are self explanatory. Please note that Started After Date and Started Before Date fields do not allow you to specify time. So, the limitation is that custom views cannot be used to retrieve process instances that were created in a time frame less than a day (24 hours).
- Check the Administrative View box to view the process instances created by other users. Otherwise, the custom view will only return process instances created by you.
Business Process Execution Language (BPEL) allows you to expose various attributes of a variable. The exposed attributes called query properties can be used to further narrow down the process instances returned by a custom view. The query properties allow you to identify process instances based on data present in the business variable. Following is a snippet of a BPEL that shows how attributes of the EmpVariable business object are exposed as query properties.
Listing 1: Sample query properties defined in the BPEL
<?xml version="1.0" encoding="UTF-8"?>
<bpws:process xmlns:bpws=http://schemas.xmlsoap.org/ws/2004/03/business-process/ xmlns:ns=
http://com/foo/employee/process
…
…
<bpws:variables>
<bpws:variable name="EmpVariable" type="ns:EMPBO" wpc:id="1001">
<wpc:queryProperties>
<wpc:queryProperty name="empNumber" type="xsd:string">
<wpc:query><![CDATA[employeeNum]]></wpc:query>
</wpc:queryProperty>
<wpc:queryProperty name="empSSN" type="xsd:string">
<wpc:query><![CDATA[employeeSSN]]></wpc:query>
</wpc:queryProperty>
<wpc:queryProperty name="empZipCode" type="xsd:string">
<wpc:query><![CDATA[addressBO/employeeZip]]></wpc:query>
</bpws:variable>
…
…
</bpws:process>
|
To use query properties in a custom view:
- Click Query Properties in the Search And Define Views For Process Instances page.
-
Specify “Property Name”, “Variable Name”, “Namespace”, “Property Value” and click Add. For example, in Figure 2 we used
empNumberproperty that is defined in the Listing 1. The following values are used:-
Property Name:
empNumber -
Variable Name:
EmpVariable -
Namespace:
http://com/foo/employee/process - Property Value: ‘555555’
-
Property Name:
Please note that “Property Name”, “Variable Name” and “Namespace” values match the values specified in the BPEL (highlighted in Listing 1). Also, note that we used single quotes around the “Property Value” value. Using single quotes is not required, but we have observed that the custom view did not return expected process instances when we did not specify quotes for some values.
Figure 2: Specifying a query property in a custom query
Customizing the number of results displayed in a view
You can control the number of results returned in a view by the BPC Explorer by editing faces-config.xml of the BPC Explorer application. The faces-config.xml is located in the <WPS profile directory>/installedApps/<Node>/BPCExplorer_<nodename>_<servername>.ear/bpcexplorer.war/WEB-INF/ directory. Listing 2 shows the snippet of the BPC Explorer faces-config.xml. To specify a threshold or a limit on number of results for process instance and human task views:
- Remove the comment markers (above the first managed property and below the last managed property.
- Specify the appropriate value for ProcessInstanceListsThreshold and TaskInstanceListsThreshold.
- Save the changes and restart the BPC Explorer.
Listing 2: BPC Explorer faces-config.xml
<faces-config>
…
…
<managed-bean>
<managed-bean-name>ApplicationConfiguration</managed-bean-name>
<managed-bean-class>com.ibm.bpc.explorer.ApplicationConfiguration
</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
<!-- Enable the following managed properties to set thresholds as required
<managed-property>
<property-name>ProcessTemplateListsThreshold</property-name>
<value>2</value>
</managed-property>
<managed-property>
<property-name>ProcessInstanceListsThreshold</property-name>
<value>2</value>
</managed-property>
<managed-property>
<property-name>TaskTemplateListsThreshold</property-name>
<value>2</value>
</managed-property>
<managed-property>
<property-name>TaskInstanceListsThreshold</property-name>
<value>2</value>
</managed-property>
-->
</managed-bean>
...
…
</faces-config>
|
The simple techniques described in this paper improve the effectiveness of using the BPC Explorer tool and can serve as a simple and useful tool to quickly trouble shoot Process Server applications in a production environment.
Learn
-
IBM WebSphere Business Process Management Version 6.0 Information Center:
Provides product documentation for WebSphere BPM. -
Performance
Tuning of Human Workflows Using Materialized Views:
This document concentrates on optimizing the throughput and API response times of human workflows and human tasks. -
WebSphere Process
Server Support:
WebSphere Process Server support, your technical resource gateway. -
WebSphere business process management
zone
IBM WebSphere provides the tools you need to model, assemble, deploy and manage business processes. -
WebSphere
Application connectivity zone
Provides application integration and application connectivity technical resources for WebSphere products. - Browse the
technology bookstore
for books on these and other technical topics.
Get products and technologies
- Download
IBM product evaluation versions
and get your hands on application development tools and middleware products from
DB2®, Lotus®, Rational®, Tivoli®, and
WebSphere®.
Discuss
- Participate in the discussion forum.
- Check out
developerWorks
blogs and
get involved in the
developerWorks community.

Anil Ambati is an IBM Certified Senior IT Specialist at IBM RTP Software Lab, Durham, North Carolina. He is currently a developer on the Request To Contract team. Anil received a Masters degree in Computer Science from the University of Texas at Arlington. You can reach Anil at: aambati@us.ibm.com

Rojan Jose is a Senior IT Specialist with IBM Software Services for WebSphere. Rojan is currently focused on engagements involving Business Integration and Business Process Management using IBM SOA product stack for WebSphere. You can reach Rojan at: rojan@us.ibm.com





