Example - monitor a P8 BPM process

This topic contains instructions for creating a small demonstration using IBM WebSphere Business Monitor functionality to monitor user-defined data fields in a sample P8 process. The example consists of four parts:

Create and configure the data source

The P8 process consists of three steps that check credit for an incoming customer order, and either ship the order or notify the customer of credit problems. The data in each process includes the Amount of the order, the region where the order will be shipped (Location), and a credit value.

Use the following general steps to create and configure the data source for this example. Detailed instructions are below.

Create the work queues and expose the data fields

  1. In Process Configuration Console, double-click the isolated region.
  2. Select the Server and create the two work queues, Notify and PackShip.
  3. Select the default event log and display the properties. Specify two data fields: Amount (Integer) and Location (String). These fields will be used in the example process and ultimately monitored using IBM Business Monitor.

Create the process

 Using Process Designer, create the very simple process shown below - SalesMonitorDemo.  

 Simple sales workflow

The purpose of this fictional process is to receive an order for some product, check the customer's credit, and then either proceed to pack and ship, or notify the customer of rejected credit. To have values to monitor, each order includes a location (N, E, S, or W), and an amount of the order. We also have different queues to monitor—Notify and PackShip, in addition to a user Inbox (CheckCredit).

  1. In Process Designer, Workflow Properties, create the following data fields. (To avoid entering values at Launch, we initialized the fields with random values as indicated.)
  2. Add the steps and routes to the map.
  3. Specify the three data fields as parameters for each of the steps.
  4. Save the workflow definition.

The concludes the preparation of the data source from P8 Process for this example.

Configure the user-defined fields in the monitor model

NOTE   See Deploy the CBE Adaptor for instructions for configuring your P8 environment and IBM WebSphere Business Monitor environment to allow WebSphere Business Monitor to receive event data from active P8 processes.

Complete the following steps to define the fields to be monitored so that IBM WebSphere Business Monitor can display the sum and average amount per location for the example process described above.

Add the user-defined fields to the P8 BPM Monitor Model

Add user-defined field (UDF) - event definition

Add the data fields Amount and Location to P8.BPM.Base event.

  1. In IBM WebSphere Integration Developer (WID), import the Project Interchange file, BPMMonitoring.zip.
  2. In Project Explorer under Event Definition, select P8 BPM and click P8.BPM.Base.
  3. On the Event Definition tab in the ExtendedData section, add the UDFs as child elements of business Data.

    ...
    VariableData
      Name: Amount     Type: integer
      Name: Location   Type: string

Add user-defined field - Monitor Details Model

We want to monitor the Amount and Location values at the process level.

  1. Under Monitor Details Model, right-click the P8 BPM Process monitoring context in the model tree, and click New > Metric.
  2. In the Create New Metric window, type Amount in the Name field and click OK.
  3. In the Metric Value Maps, add the expression to set the value of Amount.
  4. In the form editor, specify the type as integer.

Repeat steps 2 and 3 above to add the Location metric in the process monitoring context. Specify the type as string.

For detailed information regarding metric editing, please refer to Info Center of WebSphere Business Monitor.
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.btools.help.monitor.doc/Doc/tasks/mme/definingmetrics.html

Add user-defined field - Data Mart Model

Add the two data fields as a dimension or measure for the BPM Process MC Cube.

Define the Location dimension

  1. On the Data Mart Model tab of the editor, select BPM Process MC Cube in the Dimensions table, and click Add Dimension.
  2. In the Create New Dimension window, type Location in the Name field and click OK.
  3. Select the dimension and click Add Attribute. In the Create New Dimension Attribute window, type a name into the Name field and click OK.

    Click the Source cell and click the button that is displayed to open the Select Attribute Source window. Select the source of the attribute—Location.

  4. Select the Is Key check box.

Define the TotalAmount and AverageAmount measures

  1. On the Data Mart Model tab, scroll down to the Measures table.
  2. Select the BPM Process MC Cube and click Add Measure.
  3. In the Create New Measure window, type TotalAmount in the Name field and click OK.
  4. Click the Source cell and click the button to open the Select Fact Attribute window. Select the source of the measure - Amount.
  5. Click the Aggregation Function cell and select the function - Sum.
  6. Repeat the steps above to add the AverageAmount measure, selecting the function Average.

For detailed information regarding data mart editing, refer to Info Center of WebSphere Business Monitor.
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.btools.help.monitor.doc/Doc/tasks/mme/definingdatamarts.html

Deploy the updated P8 BPM Monitor Model

See Deploying a monitor model in the online Help for WebSphere Business Monitor.
 

Launch the example workflow to provide the data stream

  1. In P8, start Process Designer, and launch the SalesMonitorDemo workflow a few times (at least eight or 10) to create a data stream of workflows and work items. The data fields will be initialized with random values in each instance of the workflow.
  2. In P8 Workplace Tasks, open some (not all) of the work items in your Inbox—the CheckCredit step—and complete them so that there will be work items in the Notify and PackShip queues.

    TIP Do not complete the items in the Notify queue or the PackShip queue because we will monitor workflows and work items in progress, not completed workflows.

 

Use WebSphere Monitor Dashboard client to configure your dashboard view and view your data

Create a portlet by creating a copy of Dimensional View

  1. Start the WebSphere Dashboard client and click Administration.
  2. From the frame on the left, click Portlet Management.
  3. Click Portlets.
  4. At the Jump to page on the upper right, select page 10. For the Dimensional title, click Copy Portlet on the right.
  5. Name the portlet dimensional, and click OK.
  6. Confirm that the portlet was created by displaying the last page to see the portlet.

Create a dashboard

  1. Open Portal User Interface > Manage Pages and click My Portal.
  2. Click New Page and enter a title.
  3. Customize the page, then click OK. This creates an additional page on the My Portal page list.
  4. Click the page. Select Edit Page Layout, then click Add Portlets.
  5. Select the portlet you just created.
  6. Click OK, and the portlet is added.
  7. When finsihed, click Done, then click Manage Pages and select the My Portal tab at the top of the page.

You'll see an added tab with the new dimensional.

Configure the dashboard

  1. On the upper right (next to the trashcan), click the Configure icon.
  2. Select the appropriate monitor model.
  3. Configure based on the Process cube context.
  4. Choose from the list of available dimensions and configure the row, columns and page dimensions you want to display on the selected view.
  5. Click OK.

For additional information, refer to the Monitoring business measures with Dimensional view in the online Help for WebSphere Business Monitor.