In a previous post I have describe how to produce documents from a baseline of a DNG module. In this post I will show how to list the baselines available for a DNG module and their metadata using RPE 126.96.36.199 and DNG 4.0.6. You can also use this technique to include in a module document the metadata information of the baseline it was generated from.
The artifacts used in this post are available on the RPE Community Template Library.
NOTE: this is a workaround, please follow the DNG documentation for better/official solutions.
NOTE: this method uses DNG APIs that are not formally supported for use with RPE so it might not work with future DNG versions.
With the disclaimers in place the process starts from the RRC Reportable REST API documentation which lists an API for getting the list of baselines for a given module. Note again the “This information cannot be reported using RPE” comment.
On my DNG 4.0.6 server if I make the following request, https://giediprime:9443/rm/modulebaselines?module=https://giediprime:9443/rm/resources/_29bddf91483c4ca6945215f8500a0221&accept=*&private=true I get back the list of baselines for my modules In what looks like a Feed XML.
The XML source confirms the assumption which means it is possible to manually create a schema for the data. The schema is available alongside the example template on DevWorks, see link above.
NOTE: the entry point of the schema ( what you need to select when adding the schema to your template) is baselinefeed.xsd
The schema I have created for this data exposes the what I believe are the most interesting properties as attributes of the “moduleInfo” element under feed/entry/content. The full list of properties of the baseline is available under the child binding query.
NOTE: the elements directly under feed/entry such as author describe the feed entries and not the module baseline info.
NOTE: the baseline attribute matches the “jfsBaseline” binding and not the “url” one as its the last segment of the jfsBaseline URL you need when filtering the module content.
Accessing the baseline or the url does not work but you can use the baseline URL to get the baseline ID. Notice in the screenshot below that the baseline URL contains the ID I have used in the Producing documents from a baseline: _br43oB1wEeS3uL5XzNkgbg
Using the sample template with the URL provided above produces the following document.