By Juergenkress-Oracle on Nov 21, 2015
The objective of this exercise is make participants familiar how to prepare a BPM project for monitoring using BAM
In this exercise participants will add measurements to a given BPM process:
Prepare BAM data structure
Open given BPM process
Enable BAM for the project
Create measurement indicators
Set measurement marks
Check BAM data objects
First step when using BAM is to organize the data you are gathering. For this you’ll have to log into BAM (http://hostname:9001/OracleBAM):
and from the menu choose the BAM architect:
within the folder structure for data objects, create a new subfolder for storing your new data objects:
Your instructor should provide you with a file named “BAMTutorial.zip” Unzip the file and open the project using JDeveloper.
Select the project in the BPM navigation tree, and right click on the project to open project preferences:
Select “Process Analytics Summary” on the left hand side and select the tab “Data Targets” below:
Here you have to check “Enable BAM” and enter the folder path you created in step 1.3
Click ok and your ready to deploy your project using BAM for monitoring!
First step when using BAM in a process is to define what kind of data will be measured: you have to define business indicators. The basic indicators we use in this exercise are:
Dimensions: you use dimension to group data accordingly, e.g. grouping sales by region: North, East, South, West. If you base the dimension on numbers, you have to define ranges for grouping your data, like 0 – 1000, 1001 – 10000, etc.
Measurement: here you actually define the data you are interested in: quantity of ordered items, order total in USD, etc.
Counter: counter are somehow special in BPM: for each process instance their value will be 1 when set. Counters can be used for example to check which path of a process an instance was taken
So for our demo process you will first create a counter: within the structure window of your process, expand “Business Indicators”, and right-click “counter” to create a new counter:
In the next step you’ll create two dimension:
a dimension range (“credit range”):
as you can see here, for a numeric dimension you have to define ranges for the numbers you’re interested in
a dimension “Participant”:
and finally you’ll create for measuring the amount within your process:
After completing each of the above steps, your list of business indicators should like this by now:
As you have defined your indicators in the previous exercise, it’s now time set values when the process is executed.
To set dimension, you will use a script task: from the pallet, drop a script task between the start node and “review request”, and call it “Init Indicators”:
Double click the script task, got to implementation and set data associations:
drag lines from left to right to do the associations:
drag a line from “loan amount” to “credit range” to set the dimension for the credit range
drag a line from “loan amount” to “credit amount” for setting the measurement for the credit amount
drop an expression on top of “participant” and assign the value “Frontoffice” to it. Although creating reports by human tasks is a standard measurement you’ll get when using BAM in a BPM process, this step is to demonstrate how to set various dimension you may want to use in future reports
For setting counters, you will have to right click a flow object where you want to set the counter:
In the following dialog you will define which counter mark you want to set in this step.
Deploying the process with BAM enabled is the same as deploying any other BPM process. The only difference is that you have to enable BAM in the project preferences before deployment.
After successful deployment, log into BAM and start BAM Architect to verify that data objects for your process have been created:
To check if data objects of BAM will be populated, you will have to run the process. You will use Enterprise Manager Fusion Control to test the process. Log into Enterprise Manager (EM), e.g. http://hostname:port/em:
Select the BAMSample1 process in EM:
Cick on the TEST button for displaying the request form:
Enter some data for a credit request and start the process using “Test Web Service”:
This process consists of two human tasks which have to be fulfilled to finish the process. To ease testing, both activities should be assigned to the same user. This way you won’t have to login and out several times to finish the process.
So log into BPM workspace (e.g. http://hostname:port/bpm/workspace) using the credentials of the user, to whom you assigned the human tasks:
In your inbox, you’ll find the first assigned task “review request”:
Select the task in the list, click on “Actions” and approve it.
After approving the first task, you’ll find a second task in your inbox “Issue Credit”:
Like in the first part, do approve this task as well.
Now its time to check your data gathered by BAM. Start the BAM architect, and select the newly created Data Objects. Navigate around all data objects and observe the data.
Start the process several times with different data and different human tasks actions (approve or reject)
Add more business indicators to your project
Use the newly created business indicators in the project
Redeploy the project
Run the new version of the project and check the data objects
The objective of this exercise is make participants familiar how to create custom reports and dashboards
In this exercise participants create a custom dashboard:
Create a dashboard
Add views to the dashboard
Format / change views
Doing a drill down into views
Learn about data objects
To create your first dashboard, you’ll have to log into BAM (http://hostname:9001/OracleBAM):
Then start active studio:
To create a new report, hit the button shown below:
First you’ll have to choose the layout for your report, in our exercise we’ll choose a format with a title bar and 4 frames for the views we will insert later:
Click on the title bar to change the name of the title, for example: Tutorial
Within the 4 frames you’ll see icons for the various views for your report. “Streaming List, Bar Chart, Range Gauge,..” are all different kind of views you can create. You can also resize the frame of each view to fit your needs.
Start creating your first view by clicking on “Bar Chart” in the upper left frame:
A wizard will start in the bottom guiding you through the definition of your view: data objects, data fields, formats, filters etc.
The first step is to define the data object for the report: navigate to the “Tutorial” folder and choose the “Component” data object, then click “Next”:
Next step is to define data fields and how we would like to group them: Choose “Component_Instance_Status” for grouping, and count the number of instances “Component_Instance_ID”:
For this report, we don’t need e.g. a filter; finish your report by clicking the corresponding button:
Before proceeding with the exercise, you should save your report. Hit “Save Report AS”, and create a new subfolder:
Enter e.g. “Tutorial” as the name for the subfolder:
and finally give a name for your report and hit “Ok”:
Let’s recap what we have done so far:
We created a new report by clicking on the corresponding icon. Then we defined where the data is located we want to use for reporting. At this point it is beneficial to make yourself familiar with the underlying data object(s) for your report. Therefor you can start the “Architect” from the Oracle BAM Start menu. For further details refer to your training material from the first BAM workshop.
For the data we want to show in the report, we’ve chosen to count the number of process instances, and group them by “Component_Instance_Status” – but why? Every instance we see in Oracle BAM can only have two conditions:
active: the process instances was started, but did not finish yet
completed: the process has finished
Now if we group the number of instances by status, BAM will count all instances with status “active”, and all instances with status “completed”. The result can be seen in our first view of our report:
Next step is to change the view type: you will change the Bar Chart into a 3D Pie Chart. Therefor you will first click on “Change View Type” as illustrated in the screenshot above
And then choose the “3D Pie Chart” diagram:
This will change the diagram into a 3D Pie Chart:
Double-click on the pie chart, and then choose “Properties” on the left hand side to change the title into “Open vs. completed request”:
Finally hit “OK” to apply your changes.
Now we will add another view. Therefor we will choose a “Bar Chart” in the upper right frame. The wizard will start, where you first define the underlying data object for the view, in our case “BI_default_BAMSample1_BAMTutorialProcess” (the actual name of the data object may vary, depending on the setup by your instructor):
This time we will group our data by credit range, so we will display the sum of credit requests for each range:
ATTENTION: at this point you have to add a filter – why? Because each time a process instance will send payload data to BAM, a new entry will be generated. So if a process contains more than one measurement marks or invocation of BAM, one process instances will have multiple entries in the data object with the same payload.
Now in order to make sure you won’t sum up the same amount multiple times for one process instance, we have to make sure we summarize over the latest entry for an instance, therefor checking the “LATEST” flag.
Click on “Create a filter”:
and then “Add Entry”. For the field, choose “LATEST”, set comparison to “is equal to” and enter “Y” as the value. When finished, hit “add entry” again:
your resulting filter should look like this by now
Click ok to finish your 2nd view.
The third view (lower left corner) will be a range gauge. Select the range gauge icon:
set the data object to “COMPONENT”:
select “Component_Running_Time_In_Min” in the middle of the gauge and in the bottom, and select “Average”:
and filter for all instances, which are completed:
Click “Ok” to finish your settings.
The resulting gauge may look like this (depending on the underlying data):
As you can see the scale doesn’t fit for our test data – the red area is around 7200 minutes, far too much for our purpose.
So we have to customize our green, yellow and read areas by customizing the low, medium and high ranges.
Double-click on the range gauge, select “Properties and set the values according to the screenshot below:
Depending on your test data, adapt values for the ranges accordingly, until you’re satisfied with the result.
By now your report should look like the screenshot below. To exit the development mode and get a preview, click on “View”:
In order to do a drill down, we will first have to define a new report with exactly one view in it. Later this report will be exchange with the current view, from which you start your drill down.
So let’s first start with creating a new report, selecting a template with one view:
Change the name to “Drill Down”, and choose a “3D Bar Chart:
As data object, choose “BI_default_xx” (name depending on your data objects):
choose to group the sum of credit amounts by range:
and create a filter:
to only select the latest entry:
We will start the drilldown from our previously created report, from the “active vs. completed requests” view in the upper left corner.
Depending from which part of the view (active or completed) the user will start the drill down, we will have to pass this information to the report being called.
Therefor we will add another filter, the field we need here is “Component_Instances_Status”. To define the parameter, click on “Options”:
Choose “New Parameter Prompt”:
Give your parameter a meaningful name (e.g. “parameter_status”) , select “Use one of the values below (parameter) and then choose “All”:
Now your filter should look like this:
Now we can save the new report, and switch back to our first report. Edit the report, and double click the 3D Pie Chart in the upper left frame. Click on “Properties” and choose the tab “Drilling”.
To define your Drilling Target (the new report), click on “New Target”:
select “replace the current view”:
click on next
Clicke on “Browse” to select your new report”:
click next, and in the final page set the “Component_Instance_Status” to the newly created parameter (e.g. “parameter status”):
Stefan Wörmcke is a Principal Sales Consultant at Oracle Switzerland focusing on SOA and BPM themes. Stefan started 15 years ago at Oracle Germany as a technical consultant for SQL and Java development, Oracle iStore (internet shop application), and application development using frameworks like Struts, Oracle ADF. As one of the first Middleware Sales Consultant for Oracle in Switzerland, he was covering the whole Oracle Middleware stack for some years, and is now focusing on BPM themes, helping customer enabling BPM initiatives throughout their organization. Architecture reviews, BPM best practices and hands-on workshops for customer and partner are just a few examples of Stefans' activities to grow BPM adoption in Switzerland.
For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.