yuuvis® RAD Q&A

0 votes
by (310 points)

Greetings,
we currently have the problem, that there may be objects where a linked object becomes deleted. The link itself stays on the object but prevents saving the object with the now corrupted link.

As updating the object ( .../rest-ws/#ENDPOINT:DmsService.updateItem ) leads to the same error we tried to use the batch update mechanism( .../rest-ws/#ENDPOINT:DmsBatchService.updateObjects ) as it does not check for invalid data when manipulating an object.

The problem arising now is that the documentation is unclear about whether table data is manipulatable or not via the batch update, and also not how it is done.

To date (10.09.2020) the documntation specifies:
value Fixed new value for the field. The value is expected in the same syntax as for any dms object. See DmsService
and the DmsService:
TABLE JSON array with the row content objects as array elements.

using a value like:
{"value":"[\"1FBFCE5EAB25448FAFBDA5FD0F55D7ED\",\"B3F059EC76B94F99B5CFD4D81D5A7A6C\"]"}

leads to
{"summary":{"operation":"UPDATE","successcount":0,"failurecount":1,"modifications":{"indexdata":0,"delete":0,"recycled":0,"move":0}},"success":[],"failure":[{"id":"354260899F9A4580BAB9AE4415D35FD0","error":{"status":"BAD_REQUEST","key":"DMS_METADATA_VALIDATION_ERROR","message":"The input json user meta contains invalid values. See cause message for more details.","time":"2020-09-10T09:19:30.992Z","cause":{"messages":["The element type [dms:anspruch.aanforderungen] is a unsupported element type [TABLE]. Expecting [simple]."]}}}],"warnings":[]}

We dont know if this means that tables as a whole are not supported when batch updating or if the data isexpected in another format.

The object to update is a table with ID entries.

If it is not possible to batch update these: Is there another way to remove/have the corrupted/missing links removed automatically (e.g. when an Item gets deleted all of the links pointing to it will be removed)? Otherwise each currently linked Object has to be checked for existence and otherwise be removed when updating the object which - when iterating over many objects - could be very time consuming.

Also, if there are types that are not permitted it would be great to notate this in the documentation and if they are permitted to have at least one example for those

Thanks
Vadim

1 Answer

0 votes
by (19.2k points)

Dear Vadim,

OK, you found a documentation error. This call does not support every fieldtype, especially not the multi-fieds. This will be corrected with COOL-13173 in version 6.12.
So, Please, use the single calls in this case.

Best Regrads
Martin

Related questions

0 votes
1 answer
asked Apr 30, 2019 by katsikiotisP (200 points)
0 votes
1 answer
asked Feb 22, 2022 by Marcel Maier (750 points)
0 votes
1 answer
asked Sep 18, 2019 by Kirk (120 points)
...