Linking OLSC resources within DNG
I've stood up an OSLC Bugzilla server and successfully connected DNG to it as an Outbound Friend in both the server administration area and the project administration area. Now I cannot figure out what I need to do to create a link from the DNG artifact to the Bugzilla server.
I locate the DNG resource and click the Edit button. Then I click the create link button which pop up a view to locate the resource I want to link to. The problem is I don't see any option to select the Bugzilla as the repository to search for links.
What am I missing? Should I be clicking on a different button in the DNG UI?
Thanks in advance!
5 answers
I made it work for RDNG 6.x. The problem is that RDNG request the Bugzilla services document in application/rdf+xml and is not able to consume it ( it only consume application/xml ).
Comments
Thank you. I'll give it a try. Do you recall which classes you touched? The ServiceProviderService.class or all of them?
AbstractOslcRdfXmlProvider, Method writeTo().
Thanks for that. I've set break points in both of the writeTo() method signatures in that class and the thread never stops there when I attempt to add the Bugzilla association in DNG. I'm just prompted to authenticate over and over again. My break point in the CredentialsFilter is called every time and authenticates successfully. What version of the oslc4j-jena-provider.jar are you modifying? I'm using 3.0.0-SNAPSHOT. Any suggestions?
You have to pass the authentication step. Do you have a valid/active user in Bugzilla? After it is logged the Service Document is requested.
Yes I have a Bugzilla account and I've verified it by logging in directly to their site.
Now in DNG I attempt to Add the Association and I select the Bugzilla Application in the Add Association dialog. Then I'm presented a login window with content generated by the Bugzilla adapter. I provide my credentials and I'm certain the provider authenticates successfully because I have a break point set in the provider to step through that code. The provider responds with a 204 (No Content) status and the login window closes and then immediately reopens prompting me to enter my credentials again. I don't see any errors to indicate what's going wrong in the client or either server hosting DNG or Bugzilla.
With Jim and Gabriel's help in this thread I finally got it working. The part about adding the Bugzilla provider to a DNG "Projet Area" as a "Friend (Outbound)" I knew already.
Jim helped by pointing out that I had to create an "Association" to a Bugzilla service on the "Manage Project Area" UI. Make sure you click the Save button at the top of that screen after you've created the association.
Note that I got tired of fighting with getting DNG v5 to connect. v5 got stuck in a perpetual authentication loop in the UI every time I tried to create a Association. So I upgraded to v6.
Gabriel helped by pointing out that DNG v6 was incapable of reading the application/rdf+xml response which contained the Delegated UI information. And by editing the following Class' writeTo method...
o.e.l.o.p.j.AbstractOslcRdfXmlProviderand forcing it to return application/xml would allow DNG to find and use the Delegated Ui's. On line 147 I did this...
getSerializationLanguage(MediaType.APPLICATION_XML_TYPE);Thanks for everyone's help! I hope this helps someone else.
I guess the question is why doesn't DNG support the rdf+xml content-type?
Hi Matthew,
- Make sure DNG is authenticating correctly with Bugzilla (secrets and passwords are correct)
- Link the Bugzilla project to the DNG project. Not sure if project linking can be done with non-CLM projects but it's something to try. Go to the project area's admin web page. Select Overview > Associations > Add. Select the target application.
- Make sure the Bugzilla OSLC server is providing a delegated UI. When you go to select a Bugzilla entry, it should be the Bugzilla app (or OSLC interface) that provides the UI that lists available bugs. I don't think Bugzilla provides this by itself, so whatever OSLC extension to Bugzilla that you're using needs to provide it.
Comments
Thanks for the feedback. The suggestion to Add the Association is definitely a step I was missing. Unfortunately I'm still stuck. I select the Bugzilla Application in the Add Association dialog and then I'm presented a login window with content generated by the Bugzilla adapter. I provide my credentials and I'm certain the provider authenticates successfully because I have a break point set in the provider to step through that code. The provider responds with a 204 (No Content) status and the login window close and then immediately reopens prompting me to enter my credentials again. I don't see any errors to indicate what's going wrong in the client or either server hosting DNG or Bugzilla. Any ideas?
Note that I'm using a v5 DNG server.
Jim,
I upgraded to DNG 6 and can create the association to the Bugzilla adapter now. But now I cannot figure out what to do in the DNG UI to allow me to create links to a Bugzilla artifact. I edit an artifact in the DNG project area where I added the Bugzilla association and then I click on the "Add Link to Artifact" button. I don't see any option to select the Bugzilla provider. What am I missing now?
Thanks!
Okay. So I can see Bugzilla in the list when I attempt to create a link now. I had overlooked the Save button at the top of the Manage Project Area screen. I suppose that's intuitive???
Anyway, the problem is now that there's no delegated UI being rendered. I can see that the Bugzilla server sends back content in application/rdf+xml format and the response does contain delegated UI URI's. Any ideas?
Maybe I need to go back and look at Gabriel's suggestion again. Did you have to edit any Lyo source like he did in order to get it working?
You'll have to check with the Bugzilla adapter to see if it provides a delegated UI. It looks like it might not. If that's the case you'll need to render the UI yourself (sorry!). It's a matter of displaying the list of bugs, allowing someone to select one, then establishing the link with the Bugzilla adapter.
The OSLC Bugzilla application was written for Jazz 5.x. I will not be surprised that it doesn’t work for v 6.x as it has introduced configuration management concepts. There is additional configuration selection in the process.
Anyway, at this step, follow the instructions Jim has described. You definitely need to associate your Bugzilla service provider to an existing project area in DNG. Provided that your Bugzilla adapter provides a delegated UI, you will be able to create a traceability link .
I hope it helps.
Implementors of OSLC ServiceProviders may be able to satisfy DNG by claiming to @Produce( OslcMediaType.APPLICATION_RDF_XML) but then in the Response builder setting the entity type to MediaType.APPLICATION_XML.
Comments
Could you pls explain how to alter the Response builder? Thanks
If you are implementing your own Service controller and so can code the @Produces annotation on the REST method, you can also code the MediaType which the Response builder actually sends back.
// TODO: See https://jazz.net/jazz03/web/projects/Requirements%20Management#action=com.ibm.team.workitem.viewWorkItem&id=115412 // Jazz DNG prior to 6.0.5 requests but cannot accept rdf+xml, can only process application/xml return Optional.ofNullable( acceptType ) .filter( at -> at.contains( "application/x-oslc-cm-service-description+xml" ) ) .map( at -> responseBuilder.type( MediaType.APPLICATION_XML ) ) .orElse( responseBuilder ) .build();
Comments
Matthew Stone
Jun 01 '17, 1:15 p.m.Figured it out. See my answer below.