SAP NetWeaver Business Process Management 7.3 EHP1 offers various possibilities to search process instances using process context attributes. The default out of the box solution is to use the SAP NetWeaver Administrator (NWA) and go to Operations > Processes and Tasks > Manage Processes. A process administrator/technical administrator would be able to search process instances using specific context attributes.
If you require more flexibility with respect to search criteria and provide a monitoring application outside the NWA, you can build custom monitoring application using the BPM public API. BPM Public API offers Java APIs to access process management, task management and reporting data sources.
A reporting data source is a modeled artifact in a process model and it persists the selected process context attributes for analytical/operational reporting purposes. A reporting data source persists the process instance ID together with the process context attributes, which are mapped during design time.
The context attributes persisted from a process instance can be retrieved using the BPM Reporting API. The BPM Reporting API offers various filtering capabilities to retrieve the process instances based on the filters. The life cycle of the persisted process context data is linked to the process instances. Archiving of a process instance will also archive the context attributes and it will not be accessible by using the BPM Reporting API.
The context attributes can also be persisted using custom tables. This will provide more flexibility with respect to the query filters. The context data persisted in such a custom table has its own life cycle and will not be archived as part of process archiving.
URI reportingDataSourceId = new URI ("bpm://bpm.sap.com/reporting-datasource/teched.sap.com/pop266~process/CustomerReq");
The URI contains the vendor name (teched.sap.com) and the development component name (pop266~process) and the reporting data source name (CustomerReq).
ReportingDataSource rds = BPMFactory.getReportingDataSourceManager().getReportingDataSource(reportingDataSourceId);
ReportingResultSet resultSet = BPMFactory.getReportingDataSourceManager().query(rds.getId(),"requestid", param);
Using the process instance ID retrieve the technical information about the process instance including process instance visualization URL.
while (resultSet.next())
{
String firstName = resultSet.getString("firstname");
String lastName = resultSet.getString("lastname");
String city = resultSet.getString("city");
String country = resultSet.getString("country");
URI pid = resultSet.getProcessInstanceId();
ProcessInstance processInstance = BPMFactory.getProcessInstanceManager().getProcessInstance(pid);
java.util.Date startDate = processInstance.getStartDate();
java.util.Date endDate = processInstance.getEndDate();
String subject = processInstance.getSubject();
ProcessStatus status = processInstance.getStatus();
String processurl = BPMFactory.getProcessInstanceManager().generateProcessInstanceVisualizationURL(pid).toString();
}
If you require little bit more flexibility with respect to the search criteria and to be independent of the process instance life cycle, you can persist the process context attributes in an application table using JPA. It is possible to access the process instance ID from the process context. The process instance ID and context attributes can be persisted using an automated activity. This provides various filtering capabilities including value range, which are possible in JPA.
Define a Process_ID column, which represents the process instance ID.
The rest of the column represents process context attributes.
Enter a search request using the RequestID, for example, REQ*.
This will retrieve all process instances with request ID starting REQ.
Selecting a process instance will retrieve the task instances of the process instance.
The process view column navigates to the process instance graphical visualization.
REQ713 will retrieve process instances with matching context values.
SAP Netweaver BPM Process and Task Management Facade
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
36 | |
25 | |
17 | |
13 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 |