Sample DNG RPE Templates
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
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.
|
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?
|
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.
|
^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.
|
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.
|
^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 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.
|
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 modulehttps://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.
|
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
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.