I did more test.
And by just adding a thread sleep(1000) before each request I send all is ok.
Without this thread sleep I got my children with bad order and sometimes the following errors :
Exception occurred
org.apache.wink.client.ClientRuntimeException: Connection to the move of item
https://sodius.jamacloud.com/rest/latest/items/53323 failed (HTTP 500 Internal Server Error - could not execute batch)
It seems Jama treat the Delete request before a put one and so on my request to move done by a put fails as the item is no more present. By verifying the children it lacks an item.
From my point of view this is due to a change on how Jama treat the received REST API. May be a queue or something else has been introduced and the request are not treated in a synchronous way if too many requests are sent.
------------------------------
Garros JP
------------------------------
Original Message:
Sent: 10-09-2018 12:33
From: Garros JP
Subject: Move item with REST API seems not always ok.
For place items at correct position, we move items by getting back the json and replace the item value in parent location.
For example :
"location": { "sortOrder": 0, "globalSortOrder": 98266402, "sequence": "8.1", "parent": { "item": 7243 } }
becomes :
"location": { "sortOrder": 0, "globalSortOrder": 98266402, "sequence": "8.1", "parent": { "item": 7245 } }
And we send the new json by a put request to the item to update.
We have to do this many times adn mive items to temporary parent when we want to reorder the children.
When using an older version of Jama. May be Jama Connect 8.24.0.
All is correct. But since an update my items are not correctly reordered. I feels this like REST API are not treated in the order they are sent. Or may be only change the parent item value is not enough now.
Each time I do a test the order of my children is different. But my request sent are always in the same order.
How I can do ?
Thanks for your help.
------------------------------
Garros JP
------------------------------