yuuvis® RAD Q&A

0 votes
by (760 points)

I have defined fields for an object type which are filled by extracted data automatically (designer -> aliases).

Can I trigger the extraction in case of using the rest-ws (DmsService.createItemContent, DmsService.createItemContentList, DmsService.createItemWithContentList)?

Or is there another job which gives me the extracted data filled in the correct index data fields?

1 Answer

0 votes
by (3.1k points)
edited by

If an extraction for a field is defined the index data should be filled automatically by using any of the mentioned methods. The extraction data is NOT applied to the index data if:

  1. The index data for the mapped field is already set, by user input or
    by a default value.
  2. The extraction service does not provide data for the given alias.

You can check the extraction data for a object content by using DmsService.getItemContentExtractionData

/rest-ws/service/dms/ID/content/extract
by (760 points)
What is the meaning of "already set"? Does it mean, if the object already exists?
Because replacing a document content with a new file also doesn´t write the extraction values to "empty" (no value respectively empty string) fields?
by (3.1k points)
A field is "already set", if it is not NULL and not a empty string. Only in this case the extraction data will not be applied. Existing index data for a field is not replaced.
If you use DmsService.createItemWithContentList: If the field value is supplied in the index data json or if a default value as given in the systemdefinition, a extraction value will not be set.

Is the extraction data for the field visibible if you manually create a object using the client "Create object" functionality?
by (760 points)
Yes, if I manually create one using the client, the extraction data is filled.
If I take the same file and replace the content of a "indexdata-empty" object, the values are not filled - same experience to my API call. (used version is 4.2)
by (3.1k points)
Sorry, I've to correct my above list and statement.
The third and most important reason why extraction data is not applied is: The object must be a new object. Only during creation (as version 1) the extraction data is applied to the index data fields.
But I assume it is quite easy to support your requirement.
by (760 points)
Ok, so how can it be achieved to update the extraction data?

Is there a planned development like an additional parameter for the named endpoints in which I can toggle the update?
Or could I initiate one? :-)
by (3.1k points)
edited by
+1
There is a new development task created now (COOL-8315), that will support an additional rest call query parameter. This parameter will be used to control the extraction behaviour, if content is replaced.
I assume, but don't now for sure, that the product version 4.8 - maybe 4.7 - will support this.
At the moment there is no extra call or parameter you can use. Except doing it manually with a combination of DmsService.getItemContentExtractionData and DmsService.updateIndexData.
...