It's all about the answers!

Ask a question

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


Eduard Hasa (112) | asked Aug 28 '23, 11:12 p.m.

 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.


One answer



permanent link
David Honey (1.8k17) | answered Aug 29 '23, 4:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 29 '23, 4:06 a.m.
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].

Comments
Eduard Hasa commented Aug 29 '23, 10:28 a.m.

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?


David Honey commented Aug 29 '23, 10:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.


Eduard Hasa commented Aug 29 '23, 10:50 a.m.

 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



David Honey commented Aug 29 '23, 10:55 a.m. | edited Aug 29 '23, 11:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 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.