It's all about the answers!

Ask a question

Sample DNG RPE Templates


Sean F (929) | asked Mar 14 '18, 11:45 a.m.
 Are there any more DNG RPE sample templates available anywhere?
6.0.5 only ships with 2 DNG examples
I have got quite a few things working in a template I built from scratch using the server metadata query to populate the template with a schema.
I can loop through artifacts and pick out properties.
I am not clear on how to filter the loop by artifact type.
Say I want to print of all artifacts of type FunctionalRequirement
I can filter by Title (say to find all the artifacts that contain the characters  'req' in the title) but I cannot filter by artifact type as that information seems to be buried down in the Collaboration branch (dataSource/artifact/collaboration/attributes/objectType)which is not accessible at the dataSourcs/artifact query level.
I also have not found out how to extract custom attributes. I can get the standard attributes OK that show up on the schema tree but custom attributes are not shown in the schema.

8 answers



permanent link
Sean F (929) | answered Mar 14 '18, 11:53 a.m.
OK I figured out the query for the custom atribute extraction:-
dataSource/artifact/collaboration/attributes/objectType/customAttribute (+ name or value)
Still if there are any DNG example templates anywhere would be useful to compare notes.

permanent link
Sean F (929) | answered Mar 14 '18, 1:24 p.m.
 I figured out a way to do filtering.
It is a bit of a guddle...
Create an internal variable.
Create a container with a query down to the data element that determines whether to print or not.
Assign a value of '1' to the variable when encoutering an artifact we want to print.
Assign a value of '0' to the variable when encoutering an artifact we do not want to print.
Set a condition on the printable content query container which checks the value of the variable before deciding whether to print the encountered artifact.
It seem a bit of a guddle.
is that the best way to do it?

permanent link
Matthew OReilly (4114) | answered Mar 14 '18, 11:59 p.m.
I did it this way, I'm not saying it is the best, but it does work for me. In the "script expression" section, with the "attribute" query selected, mine was, "dataSource/artifact/collaboration/attributes/objectType/customAttribute", then the @name and @value items were selected.


if (name == "CUSTOM CI ID Attr")
    "[" + value + "]"
}
else
{
    ""
}

This adds a custom CI prefix to the id of the artifact in the requirement spec; for example
[80211-SRS-83889]

permanent link
Sean F (929) | answered Mar 15 '18, 5:03 a.m.
 ^Thanks Matthew.
That is similar to what I figured out.
Once I worked out where the name and value were:-
dataSource/artifact/collaboration/attributes/objectType/customAttribute
I still find that I need to use a variable if I want to say filter on Priority == "High" and then print out the name of the artifact itself. Since the custom attributes are down in 
dataSource/artifact/collaboration/attributes/objectType/customAttribute
but the artifact name is up in
dataSource/artifact
Also enum values come out as the integer rather than the string so I will need to figure out how to grab the string value.

permanent link
Subramanya Prasad Pilar (4.6k16) | answered Mar 15 '18, 6:34 a.m.

You are right. You need to iterate twice - once to check for condition and then again to conditionally print the data. However, if you have a module view with filter, you can report directly on view (using "views" data source). Starting from DNG 6.0.4, you can execute external requests against views artifact format and create RPE templates based on views data source schema.
Requests against DNG reporting service for "views" artifact format are supported under the following formats:
https://serverName:port/rm/publish/views?moduleURI=https://serverName:port/rm/resources/_YbK4wd6IEeaEaOW7hUvrNQ&viewURI=https://serverName:port/rm/views/_iRsR8d6IEeaEaOW7hUvrNQ&projectURI=serverName:port/rm/process/project-areas/_uxdv8N3FEeaRC8I0G_Qhlg

or

https://serverName:port/rm/publish/views?moduleURI=_YbK4wd6IEeaEaOW7hUvrNQ&viewURI=_iRsR8d6IEeaEaOW7hUvrNQ&projectURI=_uxdv8N3FEeaRC8I0G_Qhlg

Note: To be able to execute an external request against "views" artifact format, project area, module and view information is necessary and view and module must belong to the project area provided on the request. If one of these parameters (moduleURI, viewURI and projectURI) is missing or invalid, or module or view do not belong to the project area, then a bad request response will be provided.

Apart from the 2 templates shipped with RPE, you can also find few RPE templates in DNG install path (under JazzTeamServer\server\conf\rm\reporting\initialization\templates\rrdg). You can refer to printModuleBook.dta, which uses views data source schema.


permanent link
Sean F (929) | answered Mar 15 '18, 10:39 a.m.
edited Mar 15 '18, 10:42 a.m.
 ^Thanks.
Good to know I am on the right track with the query structure.
And good to see there are some more DTA files to look at.
I could not really get DNG_Module.dta which ships with RPE to do anything useful (I don't even understand what it is supposed to be doing - some supporting doco would be useful with these example templates - or an associated DSX example populated with example parameters that pull something useful out of JKE Banking)
Hopefully these examples that come with DNG will shed more light on useful approaches.

Comments
Subramanya Prasad Pilar commented Mar 15 '18, 1:29 p.m. | edited Mar 15 '18, 1:30 p.m.

Unfortunately you will not find any comments or details in the .dta files shipped with DNG. Can you please suggest how these templates can be improved? Are you looking for supporting documentation on the template design or about document generation using these templates?


Sean F commented Mar 15 '18, 3:43 p.m.
 ^Thanks my comment was in relation to DNG_Module.dta which is a template that ships with RPE not DNG
I will have a look at the DNG provided templates soon.
I think if the templates can be used in conjunction with the sample data that ships with DNG (e.g. JKE Banking) and if step by step instructions are provided on how to configure a DSX file to get a meaningful report from that data then that would help users get up to speed on how to use RPE with DNG.

permanent link
Matthew OReilly (4114) | answered Mar 15 '18, 8:56 p.m.
Hi Sean,

I agree there is little RPE "how to documentation" available, but there are a couple of good videos now from some IBM people.

You may have found these already,

RPE - Create a template from a module

https://www.youtube.com/watch?v=uwsje1Zg_6U

Great example, takes a module from RM, and creates a matching dta - this is how I got started in RPE after a long time failing to get it working from the documentation available.

Editing templates with Rational Publishing Engine -1/6: A simple template with static text


this series from Dragos (ex RPE actual) is also great, especially using msword templates to autoformat/stylesheet documents.

permanent link
Sean F (929) | answered Mar 17 '18, 11:00 a.m.
edited Mar 17 '18, 11:47 a.m.
 Thanks Matthew.
The youtube videos are good.
I have been using RPE for years with DOORS and System Archtect but like Dragos says in the 3rd of his tutorial videos, the way that RPE works with different products and data repositories is quite different in each case.
I am using RPE 1.3 so I don't have access to the DNG Module built in data source schema type but that does not seem to matter.
I just use the default DS 1 + Genreric XML schema and it works fine.
 
The Module URLs dragos takes from DNG to use in the DSX files seem to be different to what I can see in DNG 6.0.5
The 'Permalink' menu option is not there - instead it is 'Share link to artifact'
The URL has the format
which has to have the end trimmed off to give
Before you can proceed with the instructions in the video. But it works OK after that small modification.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.