Skip to Content

Motivation

      Detailed statistical information about execution of the complex business processes created with SAP NetWeaver BPM is a prerequisite for decision making and figuring out the necessary adjustments to achieve the maximum performance.

    In this blog, I am going to describe the analytical features shipped with SAP NetWeaver 7.3, EhP 1, SP6 that provide statistical information about the count, statuses, and duration of execution of process and task instances as well as an overview of distribution of process and task related events over time. This information is visualized in the NWA Dashboard (http://<hostname>/bpmanalytics) and can be accessed by custom clients via the BPM Analytics API.

     This blog is organized as follows. First, I describe the features available in the dashboard. Second, there comes the description of the new functionality provided by the BPM Analytics API.

The Analytics Dashboard

     The analytics dashboard (http://<hostname>:<port>/bpmanalytics) displays the analytical information about the processes and tasks in the easily perceptible plots. In order to view the dashboard, the user must be assigned with the following roles: BPEM End User, SAP_BPM_Navigation, Every User Core, Everyone. The information summarized in the dashboard refers only to the processes and tasks for that the current user is a process and task administrator.

     The default dashboard perspective contains an overview of the system:

01Overview.png

     The chart which displays the count of the process instances in progress, in error, or completed is shown at the top left-hand corner. The time interval of interest can be specified in the dropdown box above:

02ProcessOverview.png

     The chart which displays the count of the task instances in progress, open, completed, or failed is shown at the top right-hand corner. The time interval of interest can be specified in the dropdown box above:

03TaskOverview.png

     By clicking the “View details” links below the plots one can view the detailed information about the the process and task models that are accounted for statistics:

06ProcessDetails.png

07TaskDetails.png

     In the bottom left-hand corner, one can find the list of problems related to the processes and tasks of the current user and view their details:

04TroubleshootingOverview.png

     The plot at the bottom of the page depicts the distribution of process- and task-related events (starts and completions) over time. The time interval of interest can be specified in the dropdown box above:

05TimelineOverview.png

The process and task perspectives of the dashboard provide the information only about processes and tasks correspondingly. In addition to the counts of the instances and the event time lines, one can see the figure depicting statistical information about the duration of execution of process and task instances. The average, minimum, and maximum values of execution duration are available for each process and task model:

08ProcessView.png

09TaskView.png

BPM Analytics API

    The BPM Analytics API provides functionality of obtaining statistical information about the count, statuses, and duration of execution of process and task instances as well as an overview of distribution of process and task related events over time.

     The access point to the functionality of the API can be obtained by the following Java code:

AnalyticsManager analyticsManager = BPMFactory.getAnalyticsManager();

The statistics provided to a user refers only to process and task instances for that the current user is a Business Process Administrator or/and a Business Task Administrator. 

     The archived instances are not taken into account while computing statistics.

     Statistics is aggregated over all the versions of the process models. If a process is started as subprocess it will not be taken into account while computing statistics.

Statistics

To obtain statistical information about processes and tasks, the mandatory parameters that should always be specified are java.util.Date startTime and java.util.Date endTime that limit the time when the process or task instances of interest were created or when events of interest occurred.

The BPM Analytics API provides access to 3 different types of statistics that refer to tasks and processes:

  1. Duration statistics
  2. Status statistics
  3. Event statistics

Here come the summaries of them.

Status Statistics

     Status statistics contains the information about the cumulative number of instances of a process or task model that have a certain state status.

It is represented by the ProcessStatusStatistics interface for processes and TaskStatusStatistics interface for tasks in the BPM Analytics API. They can be obtained by the following methods of the AnalyticsManager:

public List<ProcessStatusStatistics> getProcessStatusStatistics(Date startTime,
                                                                           Date endTime, Set<ProcessStatus> statuses,
                                                                                 int maxNoOfProcessModels) throws BPMException;
public List<TaskStatusStatistics> getTaskStatusStatistics(Date startTime,
                                                                 Date endTime, Set<Status> statuses, int noOfTopTaskModels)
                                                                       throws BPMException;

     startTime and endTime, in this case, refer to the starting and ending points of time when the process and task instances were created.

     The resulting lists of ProcessStatusStatistics or TaskStatusStatistics are sorted by process or task models having highest number of task instances currently in the specified statuses.

If the parameter java.util.Set<Status> statuses is specified only processes or tasks with these statuses will be counted for statistics. The counts of the process or tasks with the other statuses will be 0. The list of statuses of processes and tasks supported by the BPM Analytics API is provided below:

Enum Supported Statuses Unsupported Statuses
Processes com.sap.bpm.pm.api.ProcessStatus

CANCELLED, COMPLETED, IN_ERROR, IN_PROGRESS

FAILED, SUSPENDED

Tasks

com.sap.bpm.tm.api.Status

COMPLETED, CREATED, IN_PROGRESS, FAILED, READY

RESERVED, SUSPENDED

Duration Statistics

     Duration statistics contains the information about the time when instances of process or task models have certain statuses. It is represented by the ProcessDurationStatistics and TaskDurationStatistics interfaces for processes and tasks correspondingly. They can be obtained by the following methods of the AnalyticsManager:

public List<ProcessDurationStatistics> getProcessDurationStatistics(Date startTime, Date endTime, ProcessStatus status,
            int noOfTopProcessModels) throws BPMException;
public List<TaskDurationStatistics> getTaskDurationStatistics(Date startTime, Date endTime, Status status, int noOfTopTaskModels)
            throws BPMException;

     startTime and endTime, in this case, refer to the starting and ending points of time when the process and task instances were created.

     Duration statistics contains the information about maximum, minimum, and average time when the instances of a process or task model have a certain state status. This data can be obtained by calling the following methods of the ProcessDurationStatistics and TaskDurationStatistics interfaces:

long getMinExecutionTime();
long getAvgExecutionTime();
long getMaxExecutionTime();

Event Statistics

     Duration statistics contains the information about the number of certain events that occurred in the system during a certain time period. It is represented by the EventStatistics interface of the BPM Analytics API. It can be obtained by the following methods of the AnalyticsManager:

public List<EventStatistics> getEventStatistics(Date startTime,
               Date endTime, Set<EventType> events,
               long intervalInMilliSeconds) throws BPMException;

     startTime and endTime, in this case, refer to the starting and ending points of the time period when the events of interest occurred.

     The time period between start time and end time is split into sub-intervals of duration specified in intervalInMulliSeconds parameter. Within these sub-intervals, the cumulative number of the events specified in events parameter is quantified and set as the value of the eventCount field of the EventStatistics.

Troubleshooting

     Last but not least,  if the dashboard or the functionality of the BPM Analytics API is unavailable the first thing to do is to clear the browser cache and make sure that the latest SCAs are deployed in the system.


Resources

For an example of usage of the BPM Analytics API with Crystal Reports, please, refer to my following blog.

For further and more detailed information about the functionality of the BPM Analytics API, please, refer to the help documentation.



To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Abdulbasit Gulsen

    Hi Vasli,

    Thanks for sharing the new features. Is the Analytics Dashboard available in 7.31 SP6 by default (with usage type BPM) or is it something we should deploy separately ? I have 7.31 SP6 system with usage type BPM but I can’t access the dashboard.

    BTW, the link you’ve provided is different than the link in the help documents but neither of them doesn’t work.

    http://<hostname>:<port>/bpmanalytics

    http://<hostname>:<port>/nwa/bpmanalytics

    Best,

    Abdulbasit.

    (0) 
    1. Vasil Tsimashchuk Post author

      Hi Abdulbasit,

      In general, the dashboard should be available by default.

      However you should check whether the logged in user has the following roles assigned:

      • BPEM End User
      • SAP_BPM_Navigation
      • Every User Core Role
      • Everyone

      Maybe you could specify in more details (attach a screen shot) what you get when you try to access the dashboard?

      Thank you very much for mentioning the incorrect link.

      My link http://<hostname>:<port>/bpmanalytics is correct. I will report to the responsible for help documentation.

      (0) 
        1. Vasil Tsimashchuk Post author

          Hi Abdulbasit,

          Thanks!

          Please, check whether the following solution works for you:

          1. Open to NWA

          2. Go to Configuration -> Infrastructure -> Java System Properties

          3. Choose Applications tab

          4. Search for tc~bpem~base~ear

          5. Modify the property http.baseurl and set it to refer to http://<your host ip>:<port number>

          6. Save the changes so that the modification applies

          7. Check whether the dashboard is available

          Let me know the results 🙂

          Thanks!

          (0) 

Leave a Reply