DNG OSLC API: How to update multiple artifacts simultaneously?
Hello all,
I have project where I need to translate contents of requirement artifacts in a module to a language, and show them in a custom attribute "Translate". What my code does is to fetch the artifacts, translate and update the attribute "Translate" on each artifact. For a module with about 1000 artifacts, that's fine. But on a larger scale module, let's say 3000 artifacts, the process starts to get significantly slow.
I do use Promise.all() to translate and update 10 artifacts at the same, but not much help there. Is there any OSLC api that I can use to edit attributes and update all / selected artifacts in a module at on fewer fetches?
My current steps to translate and update each artifact are below:
1. Get artifact xml and etag for update.
response:
<rdf:RDF
The second fetch, I added the defined entry "H_Translate" with the translation and PUT it with the same resource URL.
method: "PUT"
Thanks for your support! =)))
One answer
Since you perform all operations on the resource URI, I am not aware of any way to update multiple resources in one request in OSLC.
Comments
Hi Ralph, is there any alternative to the "resourceURI" that I can update mutliple resources?
OSLC works as OSLC works, not for OSLC as I am aware.
There is a module API, but I don't think that is to update the requirements content. There is a Client Extension API, but I have no experience with it.
OK, I will take a look at the module API and the Client Extension one. Hopefully there's a robust solution to this.
Thanks Raph for your support