Introduction
Process analytics is an important part of BPM. Metrics and the analysis of metrics provide valuable information about process execution. This information can be used to optimize business processes. During the process modeling phase, Key Performance Indicators (KPI’s) must be identified and implemented in the process.
Monitoring can be done using the out of the box provides default dashboards showing the default metrics for process analysis:
- Cycle-time for completed activities
- Cycle-time for completed processes
- Number of active instances per activity, process and participant
- Average and median time for activities and processes
Another option to manage the metrics is Oracle Business Activity Monitoring (BAM). BAM allows you to create custom dashboards and real-time alerts. These dashboards allow you to make decisions based on real-time process information. KPI’s can be implemented in a BPM processes easily and can be send to BAM without much extra effort.
In this blog I will provide a detailed description how to configure BAM and the BPM process in order to feed the BAM database with process specific data (business indicators and measurement marks).
Configuration of the BAM adapter
The BPM server pushes event to BAM using the BAM adapter, this adapter must configured to be able to connect to the BAM server. Configuration is done in the Weblogic Server Console.
- Login to the console, default on http://server:7001/console
- Click on deployments in the Domain Structure panel (left-hand side)
- In the Deployments in the main panel, find OracleBamAdapter (type Resource Adapter)
- Click on the name ”OracleBamAdapter”
- Go to the Configuration tab, then to the Outbound Connection Pools tab
- Expand oracle.bam.adapter.adc.soap.SOAPConnectionFactory, click on the eis/bam/soap link
- On the properties tab set the connection settings for the bam server. (Remember to hit the “Enter-key” after changing a property value)
- Click “Save”. The first time you will be asked to create a deployment plan
- Update the BAM adapter with the (new) deployment plan. Select the checkbox for the OracleBamAdapter in the Deployments in the main panel and click on “Update”
- Select “Update this application in place with the new deployment plan changes. (A deployment plan must be specified for this option)”. Verify the correct deployment plan is selected.
- Click On “Finish”
Configuration of the BPM engine
By default the BPM Engine does not send events to BAM, this must be turned on in em.
- Login to EM, default on http://server:7001/em
- In Farm_domain expand Weblogic Domain, select your domain and then select the SOA Server (executing BPM also). If running managed servers, the AdminServer
- Click on the WebLogic Server drop-down menu, and select System MBean Browser
- In the System MBean Browser expand Application Defined MBeans, expand oracle.as.soainfra.config, expand Server and expand BPMNConfig
- Click on bpmn
- For propery DisableActions clear the value
- Click “Apply”
Configuring BAM
Data objects are created in BAM. These data objects should be organized into folders. These folders must be created first. For each partition created in EM I create a folder as I like to organize data objects accordingly.
- Open internet explorer
- Login to BAM, default on http://server:7005/OracleBAM
- Click on “Architect”, a new screen is opened.
- In the architect screen, select the folder Data Objects, then click on “Create subfolder”.
- Provide a name (corresponding to the partition) and press “Create folder”
- Press “Continue”
- Done
Configuration of the BPM project
Next, each BPM project must be prepared for BAM. First you should enable BAM. By default BAM is not used.
For easier explanation lets create a sample BPM project, BAMDemo. Create a new asynchronous process,OrderProcessIncBAM, accepting two arguments, channel (String) and amount (Int). Add one interactive, ApproveOrder. Create a new user task with outcome APPROVE and REJECT. Assign it to the role process_owner. Your test process should now look like this.
Deploy this process to a new partition “MyBAM”.
Time to configure BAM
- Open the BPM project in Jdeveloper
- Navigate to the BPM project Navigator panel (available through the View menu)
- Right-click on the project, select project preferences, go to tab Data Targets
- Leave Project Sampling Point default, “Interactive(s) only”
- Select “Enable BAM”, for the Bam Adapter JNDI name select “eis/bam/soap” from the dropdown
- Specify the Data object Path “/MyBAM”. You will also have to create this in the Bam Architect and press “OK”
Project Sampling Points
This is a special point of interest. As all samples are written to the database, this has a performance impact. Sampling points configuration should there for be well thought about. Sampling points can be configured at three levels:
- project-level, the default for all processes in this project. Can be set on project preferences
- process-level, can be set on process properties, advanced tab.
- activity-level, can be set on activity properties, basic tab, sampling point.
The setting I normally apply are:
- project-level: “interactive only”
- process-level: “inherit project default”
- activity-level: “inherit process default” for most activities. For some specific, the ones were you fill the business indicators, “generate”
Using these settings the overhead is little while the necessary BAM data is created.
Specify Business Indicators
In each process you must specify which data to send to BAM. A special variable should be used: business indicators. Using Business indicators you can specify what process-specific data must be captured. There are three types of business indicators:
- Measures: numerical data that typically signify a value that is interesting in process analytics. For example, the total amount of an order
- Dimensions: specify how process analytic data can be sliced. A dimension normally has a finite set of values. A set of ranges can be specified for the data (numbers/dates). For example, region, and order type
- Counters: useful for counting iterations. For example how often is an order mutated by an user
- Open the Structure Panel, expand Business Indicators. Right-click and select “new” of the Dimension type
- In your process create two Business Indicators: channel_Dim (String) and amount_Dim(Int). For amount_Dim create 3 ranges: low 1-100, medium 101-300 and high 301-999999
- Press “OK”
- Also create two process data objects: channel (String) and amount(Int) and fill these from the corresponding arguments in the start event.
- During process execution the business indicators must be filled with data. In the process model fill the BI with the appropriate data at the correct moment in the process. Add a script task, setIndicators, after the start event to fill the indicators from the process data objects. Indicators can also be filled using data associations on the implementation tab of another activity, most of the time you will not use a specific script activity but for this blog this is easier.
- Press “OK” twice
- Deploy the project
- Populate BAM by creating a few instances for this process.
- In BAM Architect check for an Data Object with the following name BI_<partition>_<composite name>_<process name> (BI_MyBAM_BAMDemo_OrderProcessIncBAM) in the folder specified in the Data Object Path of your project.
- In BAM Architect click on the BI_object (BI_MyBAM_BAMDemo_OrderProcessIncBAM), then click on “Contents” to validate the filling of the object.
Create Dashboard
Once you see a populated data object you can create a dashboard. You can also create the dashboard before the object is filled, but testing is more difficult.
We will create a report showing the average amount per channel.
- Open internet explorer
- Login to BAM, default on http://server:7005/OracleBAM
- Click on Active Studio, then on “Create A New Report”
- Click on the type of report you want to create, click “Single Tiled Report” (upper left)
- Click on “3D Bar chart”
- Choose your data object: /MyBAM/BI_MyBAM_BAMDemo_OrderProcessIncBAM and click on “Next”
- In the Fields tab, select “METRIC_channel_Dim”, for Chart Values select METRIC_amount_Dim and for Summary Functions select Average, deselect Sum, then press Next
- Click Finish
- Depending on the data you used to create instances, one or more bars will appear.
- Save your report.
- Go to the Active Viewer, open your report, and create a few more instances for some channels. The report should adjust automatically.
Background information
BAM user guide: http://docs.oracle.com/cd/E23943_01/user.1111/e10230/toc.htm
Used versions
JDeveloper: 11.1.1.6.0
SoaSuite: 11.1.1.6.3