3.7. Report Server
3.7.1. Creating and Deploying a Report Definition
Specify a JSON representation of the
org.overlord.rtgov.reports.ReportDefinitionclassThe report definition only contains the name of the report, and the definition of the generator. Here is an example:[ { "name" : "SLAReport", "generator" : { "@class" : "org.overlord.rtgov.reports.MVELReportGenerator", "scriptLocation" : "SLAReport.mvel" } } ]In this case, theorg.overlord.rtgov.reports.MVELReportGeneratorimplementation of the report generator is used, which also includes a property to define the location of the report script (for example, SLAReport.mvel). This MVEL SLA report script is located atsamples/sla/reportfolder.For detals onorg.overlord.rtgov.reports.ReportDefinitionclass, see API documentation.Register the Report
The Report Definition is deployed within the JEE container as a WAR file with the following structure:warfile | |-META-INF | |- beans.xml | |-WEB-INF | |-classes | | |-reports.json | | |-<custom classes/resources> | | | |-lib | |-reports-loader-jee.jar | |-<additional libraries>
Thereports.jsonfile contains the JSON representation of the report definition configuration. Thereports-loader-jee.jaracts as a bootstrapper to load and register the Report Definition. If custom report generators or scripts are defined, then the associated classes and resources can be defined in theWEB-INF/classesfolder or within additional libraries located in theWEB-INF/libfolder. Here is an example of the mavenpom.xmlthat creates this structure is:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>....</groupId> <artifactId>....</artifactId> <version>....</version> <packaging>war</packaging> <name>....</name> <properties> <rtgov.version>....</rtgov.version> </properties> <dependencies> <dependency> <groupId>org.overlord.rtgov.activity-analysis</groupId> <artifactId>reports-loader-jee</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.overlord.rtgov.activity-analysis</groupId> <artifactId>reports</artifactId> <version>${project.version}</version> <scope>test</scope> </dependency> .... </dependencies> </project>If deploying in JBoss Application Server, then include the following fragment to define the dependency on the core Runtime Governance modules:..... <build> <finalName>slamonitor-epn</finalName> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <archive> <manifestEntries> <Dependencies>deployment.overlord-rtgov.war</Dependencies> </manifestEntries> </archive> </configuration> </plugin> </plugins> </build> .....
3.7.2. Generating an Instance of the Report
Use the following URL for the service's REST GET request:
<host>/overlord-rtgov/report/generate?<parameters>
Table 3.46. Query Parameters
| Parameter | Description |
|---|---|
| report | The name of the report to be generated. This must match the previously deployed report definition name. |
| startDay/Month/Year | The optional start date for the report. If not defined, then the report will use all activities stored up until the end date. |
| endDay/Month/Year | The optional end date for the report. If not defined, then the report will use all activities up until the current date. |
| timezone | The optional timezone. |
| calendar | The optional business calendar name. A default called exists called Default which represents a working week of Monday to Friday, 9am to 5pm, excluding Christmas Day. |
org.overlord.rtgov.reports.model.Report class. See the API documentation for more details on the object model.
3.7.3. Providing a Custom Business Calendar
Define a Business Calendar
A custom Business Calendar can be defined as a JSON representation of theorg.overlord.rtgov.reports.mode.Calendarclass. See API documentation for details.Store it in the properties file
Store the calender in a file whose location is referenced using a property called calendar.<CalendarName> in theoverlord-rtgov.propertiesfile.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.