[jboss-user] [jBPM] - BPM Console - Reporting

Administrator Administrator do-not-reply at jboss.com
Thu Jan 20 11:13:16 EST 2011


Administrator Administrator [http://community.jboss.org/people/admin] modified the document:

"BPM Console - Reporting"

To view the document, visit: http://community.jboss.org/docs/DOC-13191

--------------------------------------------------------------
h1. Project information
* Source repository:  https://svn.jboss.org/repos/jbpm/projects/report-server/trunk https://svn.jboss.org/repos/jbpm/projects/report-server/trunk
Anonymous access:  http://anonsvn.jboss.org/repos/jbpm/projects/report-server/trunk/ http://anonsvn.jboss.org/repos/jbpm/projects/report-server/trunk/
* Forum:  http://www.jboss.com/index.html?module=bb&op=viewforum&f=219 jBPM Developer Forum , JBoss GWT Developer (http://www.jboss.com/index.html?module=bb&op=viewforum&f=295)
* BIRT Homepage:  http://www.eclipse.org/birt http://www.eclipse.org/birt
* BIRT version: The report server depends on *BIRT 2.2.2*
h3. Overview

The report server is a small integration layer for the BIRT runtime. The project is used to embed BIRT reports in the jBPM GWT console, but could used with other projects as well.

 *http://community.jboss.org/servlet/JiveServlet/showImage/102-13191-15-1099/rendering.jpg  http://community.jboss.org/servlet/JiveServlet/downloadImage/102-13191-15-1099/450-351/rendering.jpg* 

h2. Dependency on the BIRT ReportEngine
The report server is actually just a thin integration layer. It depends on the BIRT ReportEngine, which has to be installed along with the server. The report engine can either be picked from the BIRT website or retrieved as a maven artifact from the JBoss repository:

 <dependency>
        <groupId>org.eclipse.birt</groupId>
        <artifactId>report-engine</artifactId>
        <type>zip</type>
        <version>2.2.2</version>
 </dependency>    


h2. *JBoss AS integration*
The main server module (report-server.war) can just be dropped into the AS deploy folder. Report templates, the ReportEngine and other resources go into the BIRT working directory (refered to as $WORK_DIR):

$JBOSS_HOME/server/<config>/data/birt

h3. Working directory layout and contents
$WORK_DIR/
|_ ReportEngine/          (the BIRT report engine)
|_ output/                    (report results, *.html, *.pdf)
|_ *.rptdesign               (report templates)  

> *NOTE:* Since jBPM 3.3.1.GA the report server, including templates and the report engine is setup through the jBPM installer. In previous version you may need to do that manually.
h2. Rendering reports
The report server offers access to reports through HTTP. The default web context is '/report-server/' and reports can be retrieved using the '/view/<report_template_name>.rptdesign' resource, i.e:


GET http://localhost:8080/report-server/rs/view/process_activity.rptdesign


h3. Passing report parameters
The '/view' resource accepts an arbitrary list of url encoded HTTP GET parameters, which will be passed to the BIRT runtime upon report generation:


GET /report-server/rs/view/definition_report.rptdesign&name=MySampleProcess

> *NOTE:* A complete list of available resources and options can be seen at* /report-server/index.html*

h2. Developing report templates
Report templates are developed and customized using the BIRT designer (eclipse tool). For further information see  http://www.eclipse.org/birt BIRT webpage.

Here are some quickstart links:

*  *http://www.eclipse.org/birt/phoenix/intro/ BIRT introduction*

*  *http://download.eclipse.org/birt/downloads/examples/reports/2.1/tutorial/tutorial.html Tutorial (Flash movie)*

*  *http://www.eclipse.org/birt/phoenix/build/ Installation of the BIRT tools*


h3. Customizing the default reports
The default report templates that are used with the GWT console reside with the GWT console server module. If you want to extend or customize the default reports that ship with jBPM you could as well retrieve them from the JBoss maven repository:

<dependency>

        <groupId>org.jbpm.jbpm3</groupId>
        <artifactId>gwt-console-server</artifactId>
        <classifier>report</classifier>
        <version>1.0.0-SNAPSHOT</version>
        <type>zip</type>
</dependency>



h2. *FAQ*
h4. How do I change the datasource configuration?

If your report design contains a JDBC data source defined with both JDBC Driver URL and JNDI name, then JNDI service will be used first and JDBC driver will be used as fallback. The username and password properties, if specified, are used in both cases. When you need to ensure that JNDI service is really used, increase logging level of BIRT engine; in case of JDBC fallback you will see JNDI lookup errors in the logs.
(Taken from  http://wiki.eclipse.org/index.php/BIRT/FAQ/Data_Access#Q:_What_data_sources_does_BIRT_support.3F BIRT FAQ)

h4. How to replace the default report templates?


> 
>  # hbraun:https://www.jboss.org/community/docs/DOC-13191
> [11:23am] # hbraun:you need to install the report server
> [11:23am] # hbraun:it's a war
> [11:23am] # hbraun:and put the birt runtime under server/default/data/birt
> [11:23am] # hbraun:WORK_DIR/
> [11:23am] # hbraun:|_ ReportEngine/          (the BIRT report engine)
> [11:23am] # hbraun:|_ output/                    (report results, *.html, *.pdf)
> [11:23am] # hbraun:|_ *.rptdesign              (report templates) 
> [11:24am] # hbraun:whereas WORK_DIR is server/default/data/birt
> [11:24am] # hbraun:once you've created your own report templates, either stick to the naming convention or configure it in Application.html
> [11:25am] # hbraun:<!-- BPM console configuration -->
> [11:25am] # hbraun:  <script type="text/javascript">
> [11:25am] # hbraun:      var consoleConfig = {
> [11:25am] # hbraun:        consoleServerUrl: "http://localhost:8080/gwt-console-server",
> [11:25am] # hbraun:        reportServerUrl: "http://localhost:8080/report-server",
> [11:25am] # hbraun:        overviewReportFile:"process_activity.rptdesign",
> [11:25am] # hbraun:        definitionReportFile:"definition_report.rptdesign",
> [11:25am] # hbraun:        instanceReportFile:"instance_report.rptdesign"
> [11:25am] # hbraun:      };
> [11:25am] # hbraun:  </script>
> [11:25am] # hbraun:See? It contains the report template file names
> [11:26am] # krisv:cool, that was the info I was looking for, thx, I'll give it a try and let you know 
> [11:26am] # hbraun:you can start with the templates and the report server alone
> [11:26am] # hbraun:check the index.html it contains the resources Url's to render reports
> [11:27am] # hbraun:i.e.
> [11:27am] # hbraun:<tr>
> [11:27am] # hbraun:  <td>GET</td>
> [11:27am] # hbraun:  <td>/rs/report/view/{reportName}</td>
> [11:27am] # hbraun:  <td>View a HTML report from template 'reportName' </td>
> [11:27am] # hbraun:  <td>text/html</td>
> [11:27am] # hbraun:</tr>
> [11:28am] # hbraun:once that is running succcessfully you can move on to the console
> [11:28am] # hbraun:it basically just pulls that resources into an iframe
> [11:29am] # hbraun:based on the configured template names
>
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-13191]

Create a new document in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110120/fee54edc/attachment-0001.html 


More information about the jboss-user mailing list