Uploaded by puru karanam

IER Reporting Framework Developers Guide

advertisement
IBM Enterprise Records
Reporting Framework
Developer’s Guide
© Copyright IBM Corp. 2012, 2013
1
DISCLAIMER OF WARRANTIES
The following [enclosed] code is sample code created by IBM Corporation. This sample code
is not part of any standard or IBM product and is provided to you solely for the purpose of
assisting you in the development of your applications. The code is provided "AS IS", without
warranty of any kind. IBM shall not be liable for any damages arising out of your use of the
sample code, even if they have been advised of the possibility of such damages.
© Copyright IBM Corp. 2012, 2013. All Rights Reserved.
© Copyright IBM Corp. 2012, 2013
2
Table of Contents
1Introduction..................................................................................4
2Report Database...........................................................................5
2.1Supported Databases...................................................................................................5
2.2Creating a Report Database........................................................................................5
2.3Deleting Report Data..................................................................................................6
3Working with the Report Engine API.......................................7
3.1Development Environment.........................................................................................7
3.2Creating a Report Definition.......................................................................................8
3.3Report Engine API Procedures...................................................................................9
3.3.1Getting a DBDescriptor Instance.........................................................................9
3.3.2Report Parameters..............................................................................................10
3.3.3Getting a Report_Services Instance...................................................................11
3.3.4Returning a List of Report Queries....................................................................11
3.3.5Generating Report Data.....................................................................................11
3.3.6Deleting Report Data.........................................................................................12
4Using the Report Engine for Cognos Reporting.....................13
4.1Creating a Cognos Report Template.........................................................................13
4.2Cognos Report Templates Included in IBM Enterprise Records..............................13
4.3Deploy Cognos Report Templates Released with IBM Enterprise Records............14
4.4Run an IBM Enterprise Records Report Using the Cognos UI................................14
5Sample Code...............................................................................14
6Performance Tuning..................................................................18
7IBM Content Navigator and IBM Enterprise Records for
Cognos Reporting.........................................................................18
7.1Installing and configuring IBM Content Navigator and IBM Enterprise Records for
Cognos Reporting..........................................................................................................18
7.2Configuring the IBM Enterprise Records plug-in....................................................19
© Copyright IBM Corp. 2012, 2013
3
1 Introduction
IBM Enterprise Records reporting framework includes a set of Report Engine
Application Program Interfaces (APIs). The Report Engine API provides the ability to
run Content Engine queries and place the results in a database table. A reporting
application such as Cognos can extract the information from the database and generate a
report based on a template. A set of pre-defined templates are provided for IBM
Enterprise Records reports.
Use Cognos UI to run
Cognos reports
IBM Enterprise
Records
Use Cognos Viewer to
view Cognos reports
Retrieve the report
definitions and run
query in Report
Definitions
Cognos Reviewer to
view reports
Report Engine
Repository
(Content
Engine)
Data
Source
Cognos BI
server (Report
Templates)
Cognos
Framework
Manager
(Metatada
Modeling)
External
Database
(DB2, Oracle,
SQL Server)
This paper describes how to use the Report Engine API in a custom Java application to
enable the reporting framework. Components of the API are described and an example of
its usage is provided. This paper also describes how to use the IBM Enterprise Records
Cognos report templates for IBM Enterprise Records reports.
© Copyright IBM Corp. 2012, 2013
4
2 Report Database
2.1 Supported Databases
IBM Enterprise Records Report Engine API supports the latest databases supported by
Content Engine 5.1 and above:
• DB2 Universal Database v9.7 FPx for Linux, UNIX, Windows
• DB2 Universal Database v9.8 FPx for Linux, UNIX, Windows (pureScale)
• DB2 v10 FPx for z/OS
• SQL Server 2008 R2 SPx
• Oracle 11g R2, 11.2.0.x
For full details on supported databases, see the IBM Enterprise Records detailed system
requirements page:
http://www.ibm.com/support/docview.wss?rs=3278&uid=swg27036498
2.2 Creating a Report Database
Before using IBM Enterprise Records Report Engine API, create a database for IBM
Enterprise Records reporting. The database must have the schema name “IER_REPORT”
for Cognos report templates released with IBM Enterprise Records. The database can
coexist in the database server used for Content Engine database.
Use the tool of your choice to create the report database. It is important to configure the
database to grow automatically. For example, if you are using DB2, create the report
database with automatic storage. When you create a database with automatic storage,
you establish one or more initial storage paths. As the database grows, the database
manager creates, extends and adds containers across those storage paths.
The database user that is used to access the report database must have at least the
following permissions:
Connect to database
Create Table
Select
Insert
Delete
The first time a report is run using the new Report Engine API, the database is updated
with two tables:
• IERRPTPARAM which stores the parameters used to define the report. The same
parameters table is used for all the reports.
© Copyright IBM Corp. 2012, 2013
5
•
A data table to store the results returned by the report query. The same data table
can be used to store the results from multiple runs of the same report.
The following database structure shows the layout of the report database.
The following tables show how the RptJobId column is used to relate the data table for
‘Actions performed by user’ report with the IERRPTPARAM table. A unique report job
ID must be used for each report run.
Table name: IERRPTPARAM
Table name: ACTIONPERFORMED
2.3 Deleting Report Data
The Report Engine uses one data table for each type of report. The report table can
contain the data from multiple runs of the same report. A reporting application such as
Cognos can use the report job ID to extract the information from the database for each
report run. Depending on the amount of data involved, the report tables can grow large
over time. You can delete the data for a report that is no longer needed by using the
deleteReportData method provided in the Report Engine API. You can use the
appropriate database tool to drop the report table if all of the data it contains is no longer
needed.
© Copyright IBM Corp. 2012, 2013
6
3 Working with the Report Engine API
The IBM Enterprise Records Report Engine API includes the following capabilities:
• Runs queries as defined in the report definition
• Extracts query results from Content Engine
• Creates a table in the specified database
• Adds query results to the database tables
• Deletes report results from the database tables
The report engine stores the value of the report parameters in the table IERRPTPARAM.
The parameters for each report are identified by the RptJobId column. Two additional
entries, rpt_creator and rpt_create_date, are added for each report job ID in the
IERRPTPARAM table. The report application uses the report job ID to retrieve the value
for parameters displayed in the report.
The report definition includes the information required for generating the report data.
The report engine creates a table if it does not already exist in the destination database.
The report engine uses the property name in the select statement of the report query for
the column name. An additional column, RptJobId for the report job ID, is added to the
table. The report application, such as Cognos Report UI, uses the report job ID to retrieve
the data for the report.
3.1 Development Environment
By default, the Report Engine API and required JAR files for the Report Engine clients
are installed under ier_install_path\API\RPTENG.
The Content Engine API provides access to the content of object stores. The required
JAR files for Content Engine API are installed under
ier_install_path\CommonFiles\CE_API\lib.
Use of the Report Engine API requires a minimum Java level of J2SE v1.6. Required
Java Archive (JAR) files are listed in the following table:
.jar file
Description
Required for all Report Engine clients
ierrpteng.jar
The core Report Engine java API
ierrptengResources.jar
The resource file for Report Engine java API
Jarm.jar
The underlying API
JarmResources.jar
The resource file for the underlying API
ierLogTrace.jar
IBM Enterprise Records logging and tracing
implementation
Log4j-1.2.13.jar (or newer) The log4j framework for Report Engine API
Required for a Content Engine Java CEWS transport client
Jace.jar
The core P8 5.x JAR file for the Content Engine Java
API
Log4j.jar or equivalent
The log4j framework for JACE logging
stax-api.jar,
StAX API implementation
© Copyright IBM Corp. 2012, 2013
7
xlxpScanner.jar,
xlxpScannerUtils.jar
Required for Database
(JDBC driver JAR)
The JDBC driver for the database type
3.2 Creating a Report Definition
You can create your own report definition or use one of the six report definition files
delivered with IBM Enterprise Records and stored in the file plan object store.
IBM Enterprise Records includes six report definitions that provide a statistical view of
different user activities. These definitions are added to the file plan object store (FPOS)
through an add-on installed with the software. The files are found in the Records
Management/Report Definitions folder of the FPOS. Each report definition is an XML
document of the Report Definition class (a subclass of the Document class) and defines
the following keys for the report:
•
•
•
•
•
•
•
title
desc
entryhelp
reportName
db_table_name
report parameters
report queries
For detailed descriptions of these fields, refer to the help http://pic.dhe.ibm.com/infocenter/p8docs/v5r1m0/topic/com.ibm.p8.ier.user.doc/rm_help
/use_report_definitions.htm
Use a Content Engine SQL statement for the report query. Use the parameter {?
parameter_name} in the query. The parameter name must be defined in the “report
parameters” key of the report definition. For example:
SELECT EV.LastModifier, EV.DateCreated, EV.ClassDescription,
EV.AuditActionType,RC.RecordCategoryName AS EntityName, RMF.PathName,
RC.Aggregation FROM (Event EV INNER JOIN RecordCategory RC ON
EV.SourceObjectID = RC.ID)INNER JOIN RMFOLDER RMF on RC.parent=RMF.This
WHERE EV.DateCreated >= {?start_date} AND EV.DateCreated <= {?end_date} AND
EV.LastModifier = '{?user_name}' AND RC.this INSUBFOLDER '/{?fileplan_name}'
Test the report query by using FileNet Enterprise Manager Content Engine Query Builder
to make sure there are no syntax errors and that the returned results are correct. You need
to substitute real values for the parameters in the query. Use a small range of data so that
the query will process in a reasonable amount of time.
When creating your own report definitions, save them into the Records Management >
Report Definitions folder of the FPOS. If your system performance is impacted when
© Copyright IBM Corp. 2012, 2013
8
retrieving report definitions from your FPOS, you can improve performance by also
creating an index on “object_class_id” in the DocVersion table.
3.3 Report Engine API Procedures
This section provides information about, and code examples for, the more common
Report Engine API usages.
The Report Engine API contains the following interfaces:
• DBDescriptor
• Report_Services
To get started using the Report Engine Java API, complete the following steps:
1. Create a Map object to define the connection context to the report database.
2. Establish a database descriptor, DBDescriptor, instance that defines the context
for connecting to a database.
3. Establish a report engine service, Report_Services, instance.
Once a Report_Services instance has been established, the methods on this class can be
called to execute the query to generate the report data into the database and to clean up
the report data in the database.
3.3.1 Getting a DBDescriptor Instance
DBDescriptor has two implementing classes for connection types: JDBC_DBDescriptor
and JNDI_DBDescriptor.
3.3.1.1 JDBC_DBDescriptor
JDBC_DBDescriptor provides a method for establishing a connection to the report
database using a JDBC driver when using the Report Engine in a Java application.
Before getting a new DBDescriptor instance for a JDBC-based connection, you have to
define a database context java.util.Map collection of entries that define the database
server connection information to use. String constants defined in the DBDescriptor class
are used as the key values for the Map entries. The following table defines the applicable
Map entries required for each database type. All entry values are strings:
Map key value
DBDescriptor.DB_Server
DBDescriptor.DB_Port
DBDescriptor.DB_Database
DBDescriptor.DB_Username
DBDescriptor.DB_Password
DBDescriptor.DB_Schema
Map entry description
The host name of the database server
The port number that is assigned to the database server
The database name
The database user for connecting to the database
The user password for connecting to the database
The schema name for the database
The schema name for the IBM-provided reports is
always IER_REPORT
© Copyright IBM Corp. 2012, 2013
9
Database Type
DBType.DB2
DBType.Oracle
DBType.MSSql
Description
IBM DB2 database
Oracle database
MS SQL database
Review the following code example:
// Create a Map object to define the connection context to a database.
Map<String, String> dbContext = new HashMap<String, String>();
dbContext.put(DBDescriptor.DB_Server, "dbServerName");
dbContext.put(DBDescriptor.DB_Port,
"50000");
dbContext.put(DBDescriptor.DB_Database, "REPORTS");
dbContext.put(DBDescriptor.DB_Username, "db2admin");
dbContext.put(DBDescriptor.DB_Password, "password");
dbContext.put(DBDescriptor.DB_Schema, "IER_REPORT");
// Acquire a DBDescriptor instance with the DB2 database.
DBDescriptor dbDescriptor = new JDBC_DBDescriptor(DBType.DB2, dbContext);
// Verify the database connection. This call is optional and provides an immediate verification
// that the connection was successful failure.
dbDescriptor.verify();
3.3.1.2 JNDI_DBDescriptor
JNDI_DBDescriptor provides a method for establishing a connection with a data source
for the reports when using the Report Engine in a Web application. Create the
DataSource in your application server.
Review the following code example:
// Acquire a DBDescriptor instance with the data source name and the database schema name.
DBDescriptor dbDescriptor = new JNDI_DBDescriptor(dataSource, "IER_REPORT");
// Verify the database connection. This call is optional and provides an immediate verification
// that the connection was successful failure.
dbDescriptor.verify();
3.3.2 Report Parameters
You have to define a java.util.Map collection of entries that define the parameter
information to use. The report parameters are defined in the report definition.
For example:
Map<String, Object> rptParams = new HashMap<String, Object>();
rptParams.put("fileplan_name", "/Records Management/File Plan");
© Copyright IBM Corp. 2012, 2013
10
rptParams.put("user_name", "p8admin");
rptParams.put("start_date", "2012-04-01");
rptParams.put("end_date", "2012-05-01");
List<String> entityTypeList = new ArrayList<String>(3);
entityTypeList.add("RecordCategory");
entityTypeList.add("RecordFolder");
entityTypeList.add("Volume");
entityTypeList.add("Record");
rptParams.put("rm_entity_type", entityTypeList);
3.3.3 Getting a Report_Services Instance
Get the Report_Services for the dbDescriptor instance.
Report_Services rptServices = new Report_Services(dbDescriptor);
3.3.4 Returning a List of Report Queries
The getReportQueries method of Report_Services returns the list of report queries
associated with a report definition. This method is useful during the development of the
report to verify the report queries are generated correctly by using the values in the list of
report parameters.
For example:
// Report definition Id for Actions performed by a user.
String rptDefinitionIdent=" /Records Management/Report Definitions/Actions performed by a
user";
// jaceObjStore is an instance of com.filenet.api.core.ObjectStore for the FPOS storing
// the report definition
List<String> rptQueries = rptServices.getReportQueries(rptDefinitionIdent, jaceObjStore, rptParams);
3.3.5 Generating Report Data
The generateReportData method of Report_Services generates the report data associated
with a report definition. The method performs the following actions:
• Reads the pseudo queries from the report definitions and generates the queries
with the values in the list of report parameters.
• Creates the report parameter table IERRPTPARAM if it does not already exist in
the report database.
• Inserts the value of the report parameters into the IERRPTPARAM parameter
table.
• Creates the report results table if it does not already exist in the destination
database. The table name is defined by the key "db_table_name" in the report
definition. For example, “ActionPerformed” for “Actions performed by a user”
report.
© Copyright IBM Corp. 2012, 2013
11
•
•
•
•
Generates a value in a GUID for the report job ID if a report job ID is not
provided for the rptJobId parameter in the generateReportData method.
Executes the queries and inserts the data into the report table. The report table is
reused for multiple reports run. Each run of the report is identified by the report
job ID in the RptJobId column.
Returns the results in ReportDataResult. The results contain the report job ID and
the total rows processed for the generating report process.
Stores the value for the date fields in the database in UTC.
For example:
// Report definition Id for Actions performed by a user.
String rptDefinitionIdent=" /Records Management/Report Definitions/Actions performed by a
user";
// You can specify a job id for the report. The report job id must be unique. For example,
// rptJobId = "12345";
// If the report job id is not specified when calling
// the Report_Services.generateReportData() method,
// the report engine automatically generates a unique report job id as a GUID.
String rptJobId = null;
// jaceObjStore is an instance of com.filenet.api.core.ObjectStore for the FPOS storing
// the report definition.
// result contains the report job ID and the total rows processed
// for generating the report data.
ReportDataResult result = rptServices.generateReportData(rptDefinitionIdent, jaceObjStore,
rptParams, rptJobId);
3.3.6 Deleting Report Data
The report table is reused for multiple reports run. Each run of the report is identified by
the RptJobId column. This method provides the capability to delete the data for the report
job ID from the table associated with a report definition and the IERRPTPARAM report
table. Use the deleteReportData method of Report_Services to clean up the data in the
database after the report or the data being generated by the reporting application is no
longer needed. You can obtain the report job ID in the returned result by calling the
generateReportData method.
// jaceObjStore is an instance of com.filenet.api.core.ObjectStore for the FPOS storing
// the report definition.
// deleteResult contains the report job ID and the total rows processed
// for deleting the report data.
ReportDataResult deleteResult = rptServices.deleteReportData(result.getJobID(),
rptDefinitionIdent, ObjectStore jaceObjStore);
© Copyright IBM Corp. 2012, 2013
12
4 Using the Report Engine for Cognos Reporting
This section provides information on using the generated data with the Cognos reporting
tool.
4.1 Creating a Cognos Report Template
When creating a Cognos report template for IBM Enterprise Records reporting, use the
information in the report definition.
• Use the value of the “reportName” key in the report definition for the report
template name.
• Use the “<reportName> package” for the package name. For example, use the
package name “Actions performed by a user package” for the “Actions performed
by a user” report name.
4.2 Cognos Report Templates Included in IBM Enterprise
Records
IBM Enterprise Records provides six Cognos report templates for six report definitions
included in the FPOS. The following report templates, packaged in the IERReport.zip
file, are found on the IBM Enterprise Records software package in the CognosReports
folder.
Report name
Actions performed by a user
Containers without an
associated disposition
schedule
Entities placed on hold
Electronic records content
viewed by a user
File plan structure
Items associated with a
disposition schedule
Description
This report shows the actions that were completed after
auditing is enabled. The actions included in the report
are those performed on record categories, folders,
volumes and records.
This report shows which containers (categories and
folders) do not have an assigned disposition schedule.
This report shows the record categories, record folders,
volumes, and records that have direct disposition holds
placed on them.
This report shows which electronic records were viewed
by a specified user. It only returns data captured after
auditing is enabled.
This report shows the record categories, record folders,
and volumes that exist in the selected section of the file
plan.
This report shows the containers and record types
associated with the specified disposition schedule.
© Copyright IBM Corp. 2012, 2013
13
4.3 Deploy Cognos Report Templates Released with IBM
Enterprise Records
Before deploying the IBM Enterprise Records report templates on a Cognos report
server, create a Cognos Data Source Connection, named IER_REPORTS, to connect to
the database being used by the IBM Enterprise Records Report Engine. The schema name
of the database tables for the report templates released with IBM Enterprise Records must
be IER_REPORT.
See the Cognos Information Center for creating a Data Source Connection.
http://pic.dhe.ibm.com/infocenter/cbi/v10r1m1/index.jsp?topic=
%2Fcom.ibm.swg.ba.cognos.ug_cra.10.1.1.doc
%2Fc_addormodifyadatasourceconnection.html
To deploy the report templates included in IBM Enterprise Records on the Cognos report
server:
1. Move the deployment archive, IERReport.zip, to the target environment. The
default location is c10_location/deployment.
2. Import to the target environment. For detailed steps, see the Cognos Information
Center.
http://pic.dhe.ibm.com/infocenter/cbi/v10r1m1/topic/com.ibm.swg.ba.cognos.ug_
cra.10.1.1.doc/c_deploymentarchives.html
After the deployment, the report templates are found in the IERReport/<reportName>
Package folder via the Cognos graphical user interface.
4.4 Run an IBM Enterprise Records Report Using the Cognos UI
After the report data is added to the database table using the Report Engine
Report_Services.generateReportData method, run the Cognos report template by using
the Cognos graphical user interface. The report template extracts the data from the
database and generates a report.
You need to provide values for the parameters being defined. For example:
rpt_job_id = {24101EF4-8726-4B0F-8220-49252740D105}
(Get the report job id from Report Engine API Report_Services.ReportDataResult
returned by generateReportData.)
5 Sample Code
The following sample code illustrates how to use the IBM Enterprise Records report
engine API to generate report data into a database. The IERRptEngSampleApp.java
© Copyright IBM Corp. 2012, 2013
14
sample code file and the IERRptEngSampleApp.bat script are found in the IBM
Enterprise Records software package in the CognosReports\IERRptEng\samples folder.
It is a best practice to encrypt the password and have usernames/passwords provided in
an external file.
public class IERRptEngApp {
/**
* Replace the value for the variables below for Content Engine user context,
* database context, and the report parameters.
*/
/**
* Content engine user context.
*/
private static String CE_URL
=
"http://ceServerName:cePort/wsi/FNCEWS40MTOM";
private static String FPOS_NAME
= "FPOS";
// An IBM Enterprise Records user.
private static String USER_NAME
= "p8admin";
private static String PASSWORD
= "password";
/**
* Database context for report data.
*/
private static DBType DB_TYPE
private static String DB_SERVER
private static String DB_PORT
private static String DB_DATABASE
private static String DB_USERNAME
private static String DB_PASSWORD
= DBType.DB2;
= "dbServerName";
= "50000";
= "REPORTS";
= "db2admin";
= "db2Password";
/**
* Report parameter value for Actions performed by a user report.
* The report shows the actions performed by user “Administration”
* in file plan location “"/Records Management/File Plan"
* between "2012-01-01” and "2012-10-01".
*/
// A file plan location in the file plan object store (FPOS).
private static String PARAM_VALUE_FILEPLAN_NAME = "/Records
Management/File Plan";
// User name for the report.
private static String PARAM_VALUE_USER_NAME = "Administrator";
// The start date of the report criteria.
private static String PARAM_VALUE_START_DATE = "2012-01-01";
// The end date of the report criteria.
private static String PARAM_VALUE_END_DATE
= "2012-10-01";
/******************************************************************/
© Copyright IBM Corp. 2012, 2013
15
private static UserContext jaceUC = null;
private static String rptDefinitionIdent = "Actions performed by a user";
private static String rptJobId = null;
public static void main(String[] args) {
try {
// Establish database context.
Map<String, String> dbContext = new HashMap<String, String>();
dbContext.put(DBDescriptor.DB_Server, DB_SERVER);
dbContext.put(DBDescriptor.DB_Port, DB_PORT);
dbContext.put(DBDescriptor.DB_Database, DB_DATABASE);
dbContext.put(DBDescriptor.DB_Username, DB_USERNAME);
dbContext.put(DBDescriptor.DB_Password, DB_PASSWORD);
// Must use the Schema Name IER_REPORT for the database
// if you are using the OOTB Cognos report templates.
dbContext.put(DBDescriptor.DB_Schema, "IER_REPORT");
DBDescriptor dbDescriptor = new JDBC_DBDescriptor(DB_TYPE,
dbContext);
dbDescriptor.verify();
// Set value for report parameters
Map<String, Object> rptParams = new HashMap<String, Object>();
rptParams.put("fileplan_name",
PARAM_VALUE_FILEPLAN_NAME);
rptParams.put("user_name", PARAM_VALUE_USER_NAME);
rptParams.put("start_date", PARAM_VALUE_START_DATE);
rptParams.put("end_date", PARAM_VALUE_END_DATE);
List<String> entityTypeList = new ArrayList<String>(3);
entityTypeList.add("RecordCategory");
entityTypeList.add("RecordFolder");
entityTypeList.add("Volume");
entityTypeList.add("Record");
rptParams.put("rm_entity_type", entityTypeList);
// Get the Jace ObjectStore for File Plan Object Store (FPOS).
ObjectStore jaceObjStore = getJaceObjectStore();
System.out.println("\nRunning test for report definition: "
+ rptDefinitionIdent);
Report_Services rptServices = new Report_Services(dbDescriptor);
// You can specify a job id for the report.
// The report job id must be unique.
// If the report job id is not specified when calling
// the Report_Services.generateReportData() method,
// the report engine will generate a report job id in a GUID automatically.
// rptJobId = "12345";
© Copyright IBM Corp. 2012, 2013
16
// Get the report queries with the provided parameter values.
// This step is for informational purposes and is optional.
rptDefinitionIdent = "/Records Management/Report Definitions/" +
rptDefinitionIdent;
List<String> rptQueries = rptServices.getReportQueries(
rptDefinitionIdent, jaceObjStore, rptParams);
System.out.println("\nGenerated report query:");
for (int i = 0; i < rptQueries.size(); i++) {
System.out.println(rptQueries.get(i).toString());
}
// Generate the report data to the database.
// result contains the report job ID and the total rows
// processed for generating the report data.
ReportDataResult result = rptServices.generateReportData(
rptDefinitionIdent, jaceObjStore, rptParams, rptJobId);
System.out.println("Report job id: " + result.getJobID());
System.out.println("Total Database Rows Inserted: "
+ result.getTotalRowsProcessed());
// Delete the report data from the database.
// ReportDataResult deleteResult =
//
rptServices.deleteReportData(result.getJobID(),
//
rptDefinitionIdent, jaceObjStore);
// System.out.println("\nTotal Database Rows Deleted: " +
//
deleteResult.getTotalRowsProcessed());
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (jaceUC != null)
jaceUC.popSubject();
}
}
private static ObjectStore getJaceObjectStore() {
String JAAS_STANZA = "FileNetP8WSI";
Connection jaceConnection = Factory.Connection.getConnection(CE_URL);
Subject jaceSubject = UserContext.createSubject(jaceConnection,
USER_NAME, PASSWORD, JAAS_STANZA);
jaceUC = UserContext.get();
jaceUC.pushSubject(jaceSubject);
Domain jaceDomain = Factory.Domain.fetchInstance(jaceConnection, null,
null);
ObjectStore fpos = Factory.ObjectStore.fetchInstance(jaceDomain,
FPOS_NAME, null);
return fpos;
}
© Copyright IBM Corp. 2012, 2013
17
}
6 Performance Tuning
Depending on the performance of the P8 Content Engine searches, the report queries
might run slower than desired. To improve the search performance, complete
performance optimization steps such as enhancing database indexes for your FPOS and
ROS.
You can use the FileNet Enterprise Manager Content Engine Query Builder to see the
performance of the query. The query time for a report to populate the data to the
database and running the query using the FileNet Enterprise Manager Content Engine
Query Builder and the Report Engine API are roughly the same.
For information about creating database indexes for Content Engine searches, refer to
Indexing for IBM FileNet P8 Content Engine Searches.
http://www-01.ibm.com/support/docview.wss?uid=swg21502886&wv=1
For performance tuning guidelines, refer to the performance tuning topic in the P8
InfoCenter.
http://pic.dhe.ibm.com/infocenter/p8docs/v5r1m0/index.jsp?topic=
%2Fcom.ibm.p8.performance.doc%2Fp8ppt000.htm
7 IBM Content Navigator and IBM Enterprise Records
for Cognos Reporting
The IBM Enterprise Records plug-in contains a Report feature and reporting capabilities
that can be exposed inside IBM Enterprise Records Administration Client or IBM
Content Navigator. The report feature allows you to enter report parameters, run existing
cognos reports, and view report results.
The report feature takes care of calling the Report Engine APIs to generate reports for
Cognos. It will also handle deleting any reporting data afterwards. If you use the
provided Cognos reports out of the box, you will not need to write code or call the Report
Engine APIs at all.
Besides just the report feature, you can also schedule reports to run inside a task feature.
Scheduled reports can run asynchronously and you can view the results of the report at a
later time.
Finally the IBM Enterprise Records Administration Client will also provide a user
interface to create report definitions described in section 3.2. You can access this by
opening the configuration view and navigating to report definitions.
© Copyright IBM Corp. 2012, 2013
18
7.1 Installing and configuring IBM Content Navigator and IBM
Enterprise Records for Cognos Reporting
To run the Cognos reports released with IBM Enterprise Records, you must have Cognos
Business Intelligence installed and configured. You must also have the report templates
deployed on the Cognos server as described in section 4.3.
You must have IBM Content Navigator installed and configured. The Cognos reporting
capabilities of IBM Enterprise Records are packaged with the IBM Enterprise Records
plug-in.
To install and configure the IBM Enterprise Records plug-in, follow the instructions in
the Installation and Upgrade Guide to load the plug-in into IBM Content Navigator:
http://pic.dhe.ibm.com/infocenter/p8docs/v5r2m0/topic/com.ibm.p8.installingrm.doc/frm
co007.htm
7.2 Configuring the IBM Enterprise Records plug-in
To run the Cognos reports, you must set the JNDI name of the Report Engine database,
Cognos Dispatch Servlet URI, and the Cognos Server Gateway URI for the plug-in.
You must already have a JDBC data source connected to the database being used by the
IBM Enterprise Records Report Engine in the web application server. You must also
have finished setting up the IBM Enterprise Records Administration Client Plug-in with
IBM Content Navigator.
Complete the following steps to configure the JNDI name of the Report Engine database,
Cognos Dispatch Servlet URI, and the Cognos Gateway URI in the configuration area of
the plug-in:
1. Access the IBM Enterprise Records Administration Client. The url is typically:
http://serverName:port/desktop=IER
2. Open Administration View on the left, click on Settings and then open the
Reports tab.
3. In the Configuration screen, click the Cognos Report tab.
4. Enter the appropriate values for the Cognos Gateway URI, Cognos Servlet
Dispatch URI, and the JNDI name of the Report Engine database. For example,
the Cognos Gateway URI is typically: “http://[SERVER]/ibmcognos/cgibin/cognos.cgi”. The Cognos Servlet Dispatch URI is typically http://[SERVER
]:9300/p2pd/servlet/dispatch. The JNDI name of the Report Engine database is
typically: “JDBC/[NAME]”.
Note: For the Cognos report search path, if you deployed the Cognos reports to a
different folder path, you can change it here. The out of the box path assumes all
reports are loaded under the public folder “IERReport.” If you change the folder or
add additional sub directories, you will need modify the search path using the same
syntax. For example, if you placed all the reports under IERReport/subdirectory, the
© Copyright IBM Corp. 2012, 2013
19
new search path will be:
“/content/folder[@name='IERReport']/ folder[@name='subdirectory']”
Note: For the Cognos authentication namespace, if you set Cognos to allow for
anonymous access, you can leave the field blank. If you setup Cognos with a
namespace that requires authentication, provide that namespace in the textbox.
5. Click Save.
By default, the report feature is exposed under IBM Enterprise Records Administration
client. If you want to expose the report feature offered to IBM Content Navigator
desktop as well, complete the following steps:
1.
2.
3.
4.
5.
6.
7.
8.
Access the IBM Content Navigator admin configuration.
Select your default desktop.
Select the Appearance tab.
Under Layout/Displayed features, move the “Reports” feature exposed by the
IBM Enterprise Records plug-in from “Available Features” to “Selected
Features.”
Save the desktop.
Refresh the web browser.
Access the default desktop from IBM Content Navigator. You should now see a
new report icon.
You can access the report icon to find a listing of Cognos reports.
© Copyright IBM Corp. 2012, 2013
20
© Copyright IBM Corp. 2012, 2013
21
© Copyright IBM Corp. 2012, 2013
22
Download