Show TOC

Background documentationAnalytics Public API for Business Users Locate this document in the navigation structure

 

You can use the BPM analytics public API (AnalyticsManager, com.sap.bpm.analytics.api) to obtain analytics information for business process administrators and business task administrators. You can display statistics pertaining to processes, tasks, and events.

To be able to use this API, the current user must be a business process administrator or/and a business task administrator for any active instance on the system. The archived instances are not taken into account.

The statistics provided by this interface includes only the process instances for which the logged in user is assigned as one of the business process administrators and the task instances for which the logged in user is assigned as one of the business task administrators.

For a detailed description of the BPM public APIs, see http://help.sap.com/javadocs/ (under   SAP NetWeaver 7.3 including Enhancement Package 1   Composition Environment   Process and Task Management Facade (BPM)  ).

Prerequisites

  • You have added the necessary dependencies to development component tc/bpem/facade/ear (public part api) in software component BPEM-FACADE.

  • You have ensured that your user is a Business Process Administrator and/or a Business Task Administrator or a super user with DISPLAY_ALL permission.

Procedure

  1. Get count of active process instances based on status

    Returns the ProcessStatusStatistics elements that encapsulate ProcessModel details and the number of active process instances for a given status and duration.

    Syntax Syntax

    1. List<ProcessStatusStatistics> getProcessStatusStatistics(Date startTime, Date endTime, Set<ProcessStatus> statuses, int maxNoOfProcessModels) throws BPMException
    End of the code.
  2. Get duration of active process instances based on status

    Returns the ProcessDurationStatistics elements that encapsulate ProcessModel details and the duration of active process instances for a given status and duration.

    Syntax Syntax

    1. List<ProcessDurationStatistics> getProcessDurationStatistics(Date startTime, Date endTime, ProcessStatus status, int noOfTopProcessModels) throws BPMException
    End of the code.
  3. Get count of active task instances based on status

    Returns the TaskStatusStatistics elements that encapsulate TaskModel details and the number of active task instances for a given status and duration.

    Syntax Syntax

    1. List<TaskStatusStatistics> getTaskStatusStatistics(Date startTime, Date endTime, Set<Status> statuses, int noOfTopTaskModels) throws BPMException
    End of the code.
  4. Get duration of active task instances based on status

    Returns the TaskDurationStatistics elements that encapsulate TaskModel details and the duration of active task instances for a given status and duration.

    Syntax Syntax

    1. List<TaskDurationStatistics> getTaskDurationStatistics(Date startTime, Date endTime, Status status, int noOfTopTaskModels) throws BPMException
    End of the code.
  5. Get count of events

    Returns the EventStatistics elements that encapsulate EventType details and the number of active occurrence of specified EventType for a given duration and interval.

    Syntax Syntax

    1. List<EventStatistics> getEventStatistics(Date startTime, Date endTime, Set<EventType> events, long intervalInMilliSeconds) throws BPMException
    End of the code.
  6. Get count of processes in error

    Returns the number of all active process instances in error.

    Syntax Syntax

    1. int getCountOfProcessesInError() throws BPMException
    End of the code.
  7. Get count of tasks escalated

    Returns the number of all active task instances in escalated state.

    Syntax Syntax

    1. int getCountOfTasksEscalated() throws BPMException
    End of the code.
  8. Get count of tasks in error

    Returns the number of all active task instances in error.

    Syntax Syntax

    1. int getCountOfTasksInError() throws BPMException
    End of the code.
  9. Get count of tasks without owner

    Returns the number of all active task instances without actual owner.

    Syntax Syntax

    1. int getCountOfTasksWithoutOwner() throws BPMException
    End of the code.