Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Task Tracker Successful Completion - How to get stream uri after its created.

 I am using the oslc rm apis on my java backend. I have a baseline and wanting to create a stream from it. I send the request to oslc client create a stream and get back a 202 response as expected. Now I am taking that location header for the task tracker. I am polling the task tracker just fine and finally when I get the progress 100 and confirmation that state is COMPLETE/PASS I am now trying to get the url of the stream that was created in that task. In order to do that I am getting 'references' (http://purl.org/dc/terms/references) and successfully getting back the following references string:

"1443a0fa-b8cc-41fa-8a21-df307274a26d"

I am confused now how I can get the url of the stream with that provided string above.


0 votes



One answer

Permanent link
This is described in the OSLC Configuration Management specification at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/ps01/config-resources.html#longoperations. The oslc_config:Activity has the following description for dcterms:references . That should be the URI of the created resource. If an application is returning a string rather than a URI, that application is not conformant with the OSLC Configuration Management specification.

A reference to a resource providing more details about the progress or result of the activity. For successful or partially successful operations, the dcterms:references property MUST be present, providing a link to the primary resource created or affected by the operation [CONFIG-RES-161]. For completely unsuccessful activities, this property may be missing. For activities still in progress, this MAY be a reference to a resource providing further information; which MAY be provided inline [CONFIG-RES-162].

0 votes

Comments

Im confused because im making this call to the DNG oslc api. Im getting a succesful response for the task tracker that it is complete and getting that string back in the references. So are you saying this is an issue with the oslc api for dng?

GCM code creates a DOOR Next (or any other local configuration provider) stream from a   DOORS Next baseline by:
  1. Getting the local stream and getting the streams LDPC (Linked Data Platform Container) URI from its RDF. See the OSLC Configuration Management spec.
  2. POST new RDF content to that streams LDPC URI.
  3. On getting 202 Accepted, gets the URI of the oslc_config:Activity resource from the Location header of the response
  4. Polls that activity resource until it completes. If successful, it gets the URI of the stream that was created from the dcterms:references in the oslc_config:Activity resource.
This is all as per the OSLC Configuration Management specification that I referencedf above. Please read that specification.

 I am understanding that and everything 1-4 is happening accordingly except at the end im not getting a URI of the created stream but rather getting "1443a0fa-b8cc-41fa-8a21-df307274a26d" for dcterms:references


Sounds like you are not using the above OSLC defined mechanism but something else.  Is the resource you see of RDF type oslc_config:Activity ?
If not, then you are not using an OSLC defined mechanism. Please read the OSLC Configuration Management specification.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: Aug 28 '23, 11:12 p.m.

Question was seen: 998 times

Last updated: Aug 29 '23, 11:47 a.m.

Confirmation Cancel Confirm