Blogs about Jazz

Blogs > Jazz Team Blog >

Data driven approach for generating multiple output documents with IBM Engineering Lifecycle Optimization – Publishing

This article covers how to design a template using IBM Engineering Lifecycle Optimization – Publishing (PUB) Document Studio to report for multiple user input values. Instead of having multiple document specification (.dsx) files for each user input and running them using a batch file, we are going to use a single document specification file that produces multiple output documents. Here we are using a data-driven approach, where the user values are stored in an external CSV file. The Iteration element in the template iterates for each input value read from the CSV file.

Sample use case:
The external file contains the list of IBM Engineering Workflow Management (EWM) users. For each user in the file, a separate document should be generated that shows owned WorkItems along with status, type, and other details.

Template Design:

PUB Template

How does this work?
The names of the users are available in the CSV file. PUB reads the CSV file and stores the names in an array (_usersArray).JavaScript Code

Note: The command execution needs to be enabled so that PUB can run this code. For this, add the following in %rpe_home%\launcher\rpe-launcher.ini and %rpe_home%\studio\rpe-studio.ini.
-Dcom.ibm.rational.rpe.enable_commands=true

Inside the Iteration element, the query is re-initialized for each user using a dynamic data source configuration element. Without this, the query is initialized only once throughout the iteration cycle and the values are evaluated for the query only once.

Document Break element adds a document break to the output resulting in a new file for Word output and a new sheet for Excel output. You will find multiple output files created in the path specified.

      

Note: MS Word output “Multipart Output” property is set to DYNAMIC; instead of waiting until the entire report is serialized on the disk, the output is built as PUB processes the input for each section that is divided by Document Break element.

Please note the Native Filter used. PUB will use these as fields filter in the request URL.

The PUB template and document specification files can be downloaded from here.

Subramanya Prasad Pilar
Functional Lead
IBM Engineering Lifecycle Optimization – Publishing