It's all about the answers!

Ask a question

Using RPE to publish a configuration-aware hyperlink from RTC to DNG


Bob 3 (1481564) | asked Mar 07 '18, 2:21 a.m.

 
My users want to publish RTC work items and hyperlinks to related requirements in DNG. When I publish the workitem/auditableLink/targetRef/uri, it looks like a functional hyperlink has been published. 

In MS Word:

However, when I click the link in MS Word, DNG returns the following error:


I believe this problem is caused by improper configuration context on the hyperlink that RPE produces out of RTC. 
Any thoughts or ideas? Thanks!

Accepted answer


permanent link
Kumaraswamy Gowda (39115) | answered Mar 08 '18, 12:20 a.m.

Hey Bob,
Sorry, got your requirement wrong last time.

Try this.

The current hyperlink URL you might be getting would be OSLC url like https://clmserver:9443/rm/resources/_NGK4cgTKEeiwf_qXZO_Kng. You need to convert it to OSLC_URL?oslc.configuration=C-C-URL like below.

https://clmserver:9443/rm/resources/_NGK4cgTKEeiwf_qXZO_Kng?oslc.configuration=https://gcserver:9443/gc/configuration/3606

How to get C-C URL in java script. See https://rpeactual.com/2014/07/07/accessing-the-docgen-configuration-information-in-javascript/
_sessionInfo.getDatasourceProperty( “DS1”, “Configuration-Context”, ““)

You could log important information using _sessionLogger. See https://rpeactual.com/2016/04/07/best-practices-for-building-rpe-template-part-2/

Thanks,
Kumar

Bob 3 selected this answer as the correct answer

One other answer



permanent link
Kumaraswamy Gowda (39115) | answered Mar 07 '18, 5:22 a.m.

Hi Bob,

The link that you would are printing would be a web resource. Since that resource/link doesn't have C-C, it should be failing to open in browser.

The links from RTC could be of many types. Like to requirements or to test case or to workitem itself. It could be differentiated by the following condition.

name == "com.ibm.team.workitem.linktype.implementsRequirement"
name == "com.ibm.team.workitem.linktype.testedByTestCase"

Regarding the hyperlink, if you want requirement details to be printed, you should then need to use DSC element (with text DNG schema) and configure DSC using the following to convert web resource link to REST API.

uri.replace("resources/", "publish/text?resourceURI=");

Thanks,
Kumar


Comments
Bob 3 commented Mar 07 '18, 4:13 p.m.

Kumar, thanks for your prompt response! My goal is not to print the requirement details, but to have a FUNCTIONAL HYPERLINK that the users can click on in MS Word that will take them to the correct artifact in DNG. Can you comment on what I need to do differently to get a functional hyperlink out into MS Word?

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.