Deploying templates in RRC/DNG


Once you have a report that works well in RPE and produces a great document the next question for a report designer is how to make that template available to the end users. This is especially important for users of Web based tools like DNG/QM/RTC .

The solution is to deploy the RPE template in the point product and have it generated using RRDG.  See RRDGvsRPE for an introduction of RRDG and how it relates to RPE.

The main advantage of deploying RPE templates in point products is that end users do not need to know about RPE, templates, data sources, URI and other technical details. Instead they will use the point product’s reporting UI for docgen, UI that should be more user friendly and use a terminology that is specific to the point product.

NOTE: you do not need to have RPE installed to deploy or use a template in DNG.

This article documents how to deploy an RRDG template that prints the content of a DNG module. The configuration used is  RPE 1.2.1.1 with DNG 4.0.6

All the steps of this procedure are also described on RRCtemplatesConfigurationFilesForReportWizard but I wanted to document the end to end scenario with all the steps in the logical order.

1. Design your template

Pay attention to the data source naming convention that you must follow. In my template I have 4 data sources:

  • modules – the main data source that will be configured by DNG with the module URI
  • _text – hidden data source that is configured dynamically. Note the “_” in the name
  • _resources – hidden data source that is configured dynamically. Note the “_” in the name
  • _uisketches – hidden data source that is configured dynamically. Note the “_” in the name

The template I used is available on the RPE DevWorks Wiki: moduleContentDC.dta

2. Copy the template in DNG’s RRDG folder

The RRDG template folder is server\conf\rm\reporting\initialization\templates\rrdg.

In my test environment this is:  C:\Program Files\IBM\JazzTeamServer\server\conf\rm\reporting\initialization\templates\rrdg

dngrrdg_templateLocation

NOTE: optionally you can also upload a stylesheet to be used with your template. The stylesheet must have the same name as your template but with doc extension and must be deployed in the server\conf\rm\reporting\initialization\templates\Word folder.

3. Register the new template with DNG

Next you need to make DNG aware of the new template. Edit the MANIFEST.MF file located in server\conf\rm\reporting\initialization\META-INF andcreatean entry for your template.

Make sure the path is correct and choose a label that is meaningful for the template’s intent.

Name: ModuleContent
Location: templates/rrdg/moduleContentDC.dta
Label: Module Content DC
Description: ModuleContent
Content-Type: application/octet-stream
Is-Report: true
Context: view, module, collection

NOTE: the Word stylesheet does not need to be registered in the manifest file

4. Reinitialize the publish service

This is done simply by accessing the following URL: https://clmserver9443/rm/publish/initialize

NOTE: this is needed even if the template existed and you just copied a new version on top of it.

5. Refresh the DNG Web UI

This step should be needed only the first time you add the template or if you make changes to the manifest file but I always do it to be on the safe side.

6. Publish the document using DNG’s wizard
6.1 Start the publish wizard from DNG

While in the context of a module select “Generate a document-style report” from the “Reports” menu.

dngrrdg_generatemenu

6.2. Select the report from the list

dngrrdg_selectreport

6.3. Select the module

Step 1: click add to open the resource selectordngrrdg_selectresource_1

Step 2: find the module in the list. Your module should be in the list of recently visited artifacts for an easy pick but you can search for it if not shown. dngrrdg_selectresource_2

Step 3: the list of selected modulesdngrrdg_selectresource_3

6.4 Choose the output

NOTE: If you use PDF make sure you choose “Sophisticated formatting”

dngrrdg_selectoutput

6.5 Start the document generation

dngrrdg_docgenrunning

6.6 Verify the results

Once the report generation is complete you can close the window and you will be redirected to download the result.

dngrrdg_docgenfinished

The PDF generated from the JKE Banking example is attached : Test module

Advertisements

Author: Dragos Cojocari

Architect for Rational Publishing Engine

18 thoughts on “Deploying templates in RRC/DNG”

  1. We are getting the following error when the above procedure was completed, and report doesn’t seem to complete. We used the javascript for session vars and resources data config mapping as you had in the template sample.
    CRRPE3090E No renderer found for javascript code
    RPE_HOME is not set

    1. Michele, the “no renderer found” error can be safely ignored as it does not affect the output. You should try running a few more times the report to see if the problem is consistently reproducing.

      RPE_HOME on the other hand is unexpected. Is this message seen in “\server\logs\rrdg.log” ?

      1. On my previous comment “You should try running a few more times the report to see if the problem is consistently reproducing. ” should be read as ” You should try running a few more times the report to see if the report not completing issue is consistently reproducing.”

        The 3090E is a glitch in the RRDG configuration XML bundled with DNG, glitch that manifests itself exclusively as an annoying but otherwise harmless log message.RRDG 1.2.1 bundled with DNG 4.0.6 does process the JavaScript blocks correctly and that can be easily verified by checking that rrdg.log contains the “DEBUG START” message that is generated from one of the JavaScript blocks.

  2. Yes, teh debug messages are at the beginning of the log. The modules?resources URI gets configured, but the dynamic configuration of the resources on looks like it is missing an “=” (i.e., …resources?moduleURIxxxxxxxx, instead of …resources?moduleURI=xxxxxxx) not sure if that matters. After that is when the errors start occuring. What we noticed is even though the resource configuration used for the mapping script showed it pointing to the correct module, if we put the URIs in a browser, the logs were cycling through all projects (returning ALL resources/artifacts from ALL DNG projects), not just those artifacts contained in the module we selected for the specific project. We have 4 projects and its trying to pull from all 4 project’s resources.

    1. Michele, are you using the template I have attached to the post or some other one? I ask as the naming of the data sources is very important ( it has to be Modules not Module etc)

  3. tested template you provided on call, had to update the moduleURI.replace line in the javascript to remove the “=”, so the “=” became part of the reconfigured URI [changed moduleURI.replace( “modules?resourceURI=”, “resources?moduleURI”); to moduleURI.replace( “modules?resourceURI”, “resources?moduleURI”);] . Either that or change it to [moduleURI.replace( “modules?resourceURI=”, “resources?moduleURI=”);]. This seemed to allow the report to process and provides output; however, no formatting per our WORD stylesheet (with internal macro) seems to be working. I changed the file from xxx.dot and saved as .doc as you noted above. It also contains a macro that calls other macros and does not seem to be doing anything.

    1. The template I provided earlier would not work directly when deployed in DNG due to that naming convention I mentioned amd how DNG configures the data sources based on that convention ( the URLs it sends).

      It seems you have already figured out a way to make it work but otherwise you could have use the template I linked in my post: See the “The template I used is available on the RPE DevWorks Wiki: moduleContentDC.dta” line in the above post and you can download the dta from it.

      To run macros in DNG you need to make some extra steps to “tell” DNG to run that macro, steps which I will document as the last part in this DNG blogs series.

  4. Actually, i used the template you provided as a test and had to make the change in the _resources dynamic URI configuration script as stated above to get it to work. I also fixed my templates with the correct naming conventions. Seems all that is left to do is to get it to recognize the WORD template and macros. Anxiously awaiting the extra steps needed.

  5. Draggos: We have had great success with everything you have supplied! Thank you so very much. I do have a question: Is there a way to allow the user to select the baseline Module they wish to print? instead of only allowing the current version? That’s the next hurdle.

    1. Hey Michele,

      see https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI To specify the baseline you need to add the snapshotId parameter to the request.
      Example: https://server:port/rm/publish/%5Bartifact_format%5D?snapshotId=id1

      Also see https://jazz.net/wiki/bin/view/Main/RRCReportServiceFAQ#How_can_I_generate_a_report_from for information on how to setup your template when used from within DNG. I haven’t tried this myself but from the looks of it the end user will need to specific the baseline ID and there is no way for DNG to send this information automatically or allow the user to select this baseline in a visual way.

      Regards,
      Dragos

      1. I tested the above and it works fine from standalone RPE and also deployed in DNG. But there is no way for DNG to send the baseline ID directly to RRDG or allow the user to visually select the baseline UI so the end user will have to provide the baseline ID manually as a report parameter.

        Once DevWorks maintenance is finished I will upload there the modified template.

        Regards,
        Dragos

  6. Hi Dragos
    I’ve followed your tutorial but I got this error in Generate the Report dialog box:

    “Report Generation Fail, Review the report data source configuration.”

    I’ve the same problem with a template of mine (that works If I launch it with RPE Launcher)

    I use DNG 6.0.3 with Global Configuration (not activated on this project).
    Could be that something is changed?

    Thanks and Best Regards
    Luca

  7. Hi Dragos,

    I prepared my RPE template and then wanted to deploy it to the DNG Server but my Data Sources are already named with no underscore character at the beginning. They are simply DNG Module, DNG Text and DNG Text2..

    Is there any way of changing those names at this time ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s