Document Preparation – Debugging

The sharedo debugger can be used to check the data being collated and inserted into the document during its generation and is a useful tool when investigating document / data issues.

Process

The process always begins by generating a document. This gives us details of both the document template and the work item we need to check, such as a matter.

Next, the Data Composer is presented. The user selects the data elements to be interrogated against the selected matter.

Finally, the debugger extracts the relevant data and presents it to the user for analysis.

Prepare a Document on the chosen Matter

Navigate to a work item in sharedo, such as a matter.

From the Action bar, click the Prepare icon and select the document template you wish to generate.

The Prepare Document blade is presented. Ensure that any information that you wish to check via the debugger is completed. E.g. Recipient information.

Generate the document.

We now have the details we need.

Call the Data Composer

Now, we need to select the data elements

The Data Composer can be called, either:

  1. When using the Prepare Document function to generate a selected document on a matter, as above.
    or
  2. When Editing a Template from the Template Explorer option in Document Admin.

Via the Prepare Document function

Generate a document, as at 1. above.

When generation is complete, open the browser “Console” panel by hitting

Keys CTRL, SHIFT and i at the same time,

or

Function Key F12

The Console appears at the far right:

At the foot of the Console, enter the following text, exactly as it appears here:

$dataComposer.browseCurrent("doc-gen")

Note the capital letters.

e.g. 

Hit return.

The Data Composer will appear as a blade to the right of the Prepare Document window.

Calling the Data Composer from Document Admin

Generate a document, as at 1. above.

When finished, copy the number part of the Reference from the Task aspect (you can ignore the leading zeros)

In a moment, we will use this Reference to pass the details of the matter and the specific document to the debugger.

From the Edit Document blade, click on the navigation panel Tag Browser to open the Data Composer.

Select Data Elements

We now need to select which data elements to check.

Use either of the methods described above to display the Data Composer blade. See Data Composer for further details of this function.

The key functions we need here are:

  1. Where present, click on  to the right of a data element to select it for debugging. A blue bar will appear to the left of the element to denote this.
  2. Click on  to drill down into a section
  3. The navigation path at the top of the blade will display the name of the current data set.  Click on the name to move back and forth between the different forms .

As we will be debugging data elements that relate to our document template, click on  to the right of “Document”.

Now, move thru the Data Composer, using the  to select all of the data elements that need debugging.

When ready, click on the View Selected Fields navigation panel.

A list of all your selected fields is presented:

Use the “minus” icon to remove any unwanted entries.

When happy, click on the Debug navigation bar. This brings us to the Debug console.

Debug Console

Now we have selected the data elements, we need to tell the debugger what work item we wish to extract the data for. This is handled by the Work Item Lookup.

Work Item Lookup

If the debugger had been called from the Prepare Document function on a matter then this Work Item will have been automatically completed with the selected matter/template.

If the debugger had been called from the Document Templates menu in Document Admin, then we now need to tell the debugger which matter / template we wish to extract data for. These details were captured in the Reference number acquired earlier.

So, enter Reference number into the Work Item Lookup box and select the result.

Running the Debugger

Click Run Query to run the debugger and extract the data.

The results for each data element that has been selected will be presented:

This should help you identify any issues encountered during the document generation.

In the example above, we can see that the first line of the address was returned OK, but lines 2 to 4 were null.