One more technique for debugging DNG document generation


In addition to the methods described in Troubleshooting DNG document generation with RRDG there is one more technique you can use to debug document generation in DNG: replicate the DNG document generation in a standalone RPE installation but the using RPE templates deployed on the DNG server and the DSX files created by DNG.

NOTE if the RRDG engine in DNG and the RRDG version in your standalone RPE are different the results you obtain in the two environments can be very different. Still this method remains valid and useful to understand the inner workings of RRDG in DNG.

When you use the “Generate a Document-Style report” function DNG will use all the selections you make in the wizard in order to build a document specification ( dsx) which it then passes to DNG. The DSX file are stored in <SERVER_INSTALLATION>\server\tomcat\temp\rrc_reports

dng_debug_dsxfiles

NOTE the files are cleaned up automatically by DNG after a while so you need to access them soon after they are generated.

The DSX files can be loaded and executed almost  as they are in a standalone RPE Launcher. The only change you need to make is to set the output path in a location where you have write access since the OS user account under which DNG runs might be different from the one you use to run RPE Launcher. See the red highlight in the image below.

When you open the DSX file in launcher you will notice that the RPE templates and the stylesheet ( if any) are referenced from their DNG server location. See the blue highlight in the image below.

dng_dsx_location

If you look at the data source you will notice 2 things:

  • the actual URL that DNG passes to RRDG – confirming the right URL for the template is used is the very first step in identifying and correcting a problem
  • the cookies parameter – unlike document generation from standalone RPE, the RRDG engine running in DNG receives and uses for authentication the OAuth key for the current session. You can see this value in the browser by using tools such as Web Developer in FireFox.

dng_datasource

The OAuth key is valid as long as your DNG session remains valid  ( you are still logged in DNG) and allows you to run the DSX from a standalone RPE as is. This means that you can run the document generation from within your standalone RPE to more easily monitor the progress as well as gaining access to more detailed log information.

Advertisements

Author: Dragos Cojocari

Architect for Rational Publishing Engine

3 thoughts on “One more technique for debugging DNG document generation”

  1. Is there any option to influence the dsx file generation? Especially I would be interested to know, if I can control the available output targets (e.g. only PDF and Word).

    1. The DNG UI allows you to choose what output to use but to the best of my knowledge you cannot modify the options shown by DNG and you can’t change the default option either.

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