Flux is used often to schedule reports from enterprise reporting systems such as Actuate, Oracle Reports, and Cognos. Flux 8.0.11 now supports the compilation and execution of Jasper Reports, a robust and open source Java reporting system that is available with commercial support options from TIBCO. Sample reports are provided that demonstrate using Jasper to query and report on Flux activities and status. The use of Jasper reports is not limited to Flux data. You can use Jasper Reports to query data through JDBC, TableModels, JavaBeans, XML, Hibernate, CSV, and custom sources. Then publish your reports as PDF, RTF, XML, XLS, CSV, HTML, XHTML, text, DOCX, or OpenOffice.
Installing Sample Reports
Flux provides a set of sample reports for basic reporting. These reports include:
- Failed Runs
- Workflow Audit
- Workflow Average Run Times
- File Activity
- Unzip the following file into the FLUX_HOME/reports/examples directory. Reports.zip
- Copy the JDBC jar file that you use for Flux from the FLUX_HOME/lib directory into the FLUX_HOME/reports/jdbc directory.
- Add and then configure the following entries to your runtime configuration file.
- Install the following workflow into your Flux repository and submit it for processing. Demo_Run Reports for MySQL (1).ffc
- Expedite the workflow to get it to kickoff immediately. It will take a few minutes to run.
- After the reports run, a link is displayed on the Dashboard providing access to the reports directory.
Making Reports Accessible from Reports Tab within Cockpit
The Reports tab uses runtime configuration to populate a list of available reports for review, an example runtime configuration entry for a list of reports can be seen below:
This list can be extended if you add additional reports.
Creating or Editing Jasper Reports
To create or edit Jasper reports, download and install JasperSoft's Jasper Studio and design or edit your reports. Once you have a Jasper report definition created (ex: AllAccounts.jrxml), copy it to FLUX_HOME/reports directory. You can optionally compile a Jasper report into a .jasper file using Jasper Reports Studio and and copy it to the FLUX_HOME/reports directory for execution using Flux.
Flux 8.0.11 bundles JasperStarter, a command line launcher for compiling and processing Jasper Reports. You can schedule report generation in your Flux workflows using a Process Action.
Here is a simple command to compile a Jasper report that takes an .jrxml input file and generate a .jasper file:
Here is the command to process a Jasper report file that takes an xml input data source and xpath to generate a pdf report:
Scheduling Jasper Reports using Flux
Since Jasper reports can be executed through the command line, they can also be scheduled within Flux workflows utilizing Process Actions. Variable substitution can be used to pass in runtime variables such as dates and search parameters to drive report generation.
Viewing Generated Reports
Reports can be generated and made visible to users via the embedded Flux web server, or by exposing the reports via configuring the customer-provided web application server (e.g., Tomcat). Reports written to the webapps directory webapps/reports or its subdirectories can be viewed by the URL http://localhost:7186/reports .
An example report is published on Flux website. Reports shown here include Flux status reports such as a daily run summary and a daily failed run summary. The process action contains a command line that appears as follows: