Tagging


Tags are used to describe the status of an object within a process chain independently of the object's metadata, which means no need of definition in the schema and no triggering of new versions.

Table of Contents

Introduction

In document lifecycle management, multi-stage and asynchronous processes are not uncommonquite the contrary. The first process steps are carried out with the highest priority. More complex and currently not absolutely essential process steps are carried out asynchronously with a lower priority. This saves time, and carrying out operations in parallel lets you distribute resources more evenly. To resume a process chain, additional information about the current status of the process is necessary. In order to not mix an object's metadata with its status data, there is the possibility to tag objects. 

Objects can be searched by tags and selected for the next process step. All tagging activities are recorded by the yuuvis® system in the object history (Audit Trail). Thanks to this, you can always retrace who has done what and when. Trouble shooting, reporting on the process status or general issues are made easy by this centrally stored history.

Characteristics of Tags

  • Tags describe the status of an object in a process chain.
  • Tags can be added to any object. They are stored together with the object.
  • Multiple tags can be added to one object. The number of tags assigned to one object is limited to 50.
  • The tags specify the status information via an integer value. Additionally, tags have a unique process number that can be set during the tag creation or will be randomly set after any tag operation.
  • Any tag operation is documented in the object audit trail.
  • Tags do not belong to the metadata and thus do not need to be defined in the schema. Moreover, tag operations do not lead to the creation of a new object version.
  • Tags are always available for the current object version.
  • The properties of tags are included in the searchable data.

The special feature of tags is the independence of versioning and schema definitions. Tags can only be attached to the current version of an object, whereas previous versions cannot have tags. For version-specific information, metadata provide the suitable options. They have to be defined in the Schema.

Note

If a new version of an object is created, tags can be manipulated as well. Especially, a POST update of the binary content file removes all tags from the object. The new version will not have any tags. In order to assign version-independent processing information, please use resistant tags as described below.

Tag Management

Endpoints

Tags can be set in any object creation body in the system property system:tags. In the same way, it is also possible to set, modify or remove tags for the new version of an object in any metadata POST/PATCH update call. A POST update without the explicit specification of already existing tags will remove them from the corresponding object.

Furthermore, there are endpoints for pure tag operations that do not trigger a new version of the corresponding object, but only a new entry in the audit trail:

Tag Properties

Tags are defined by the following properties:

PropertyTypeDescriptionIn a request
nameString

Name of the tag for identification. It has to be unique for the corresponding object.

The tag names are validated during a tag creation or update process. To pass the validation, they have to match the regular expression [a-z](:?[a-z][a-z0-9]*)* and must not be longer than 32 characters.

As of version 2021 Summer, the suffix :resistant triggers a specific behavior of the tag. If a tag name matches the expression [a-z](:?[a-z][a-z0-9]*)*:resistant, the tag will behave like a resistant tag as described below.

required
stateIntegerRepresents the status of the corresponding object in a process chain.required
creationDateStringDate and time of the last modification of the tag. It is set automatically by the system.optional, only available in search queries
traceIdHexadecimal lowercase string with maximum length 16

Process identification of any tag operation. If not specified in the request, a random String value will be set after the tag operation.

In a tag update or delete request, the request parameter traceIdMustMatch can be set to true. The operation will be done only if the traceId of the call matches the current traceId of the requested tag. After such update processes, the traceId of the updated tag will be the same as before.

Per default, traceIdMustMatch is set to false.

optional, specified by means of the HTTP header X-B3-TraceId

In a request, the corresponding properties are included directly in the URL for the call of the endpoint. In contrast, if tags are displayed in a response body, their properties are listed as a part of a JSON structure in the value of the property system:tags.

Handling of the 'traceId'

The traceId is a process identification that provides the possibility to retrace tag operations and tune the update or deletion permissions for the tag. In the request URL, the query parameter traceIdMustMatch can be changed from its default value false to true. Thus, two different scenarios are possible:

  • Call with traceIdMustMatch=false (default)
    The endpoint either sets the used-defined value or a random string as new traceId for the tag.
    In case of a tag deletion, the endpoint removes the tag from the corresponding object without checking the current traceId of the tag to be deleted.
  • Call with traceIdMustMatch=true
    An update or deletion endpoint takes the traceId from the request and compares it to the current traceId of the requested tag. The update or deletion operation will be performed only if the values are matching. Thus, the tag can only be updated or deleted if the previous traceId is known to the caller.
    In case of a tag creation, this condition would never match and should therefore not be used.

Resistant Tags

As of version 2021 Autumn, it is possible to assign resistant tags that are automatically transferred to the new version of an object created during an update of the binary content file.
>> POST /api/dms/objects/{objectId}/contents/file

The resistant tags will be removed from the old object version and assigned to the new object version. As usual, the previous object version will not have any tags afterwards. However, the new version will have all the resistant tags assigned to it that were originally assigned to the previous version. Conventional non-resistant tags will not be reassigned to the new object version.

Resistant tags are identified by the suffix :resistant at the end of the string tag name.

Summary

This article gave an introduction into the handling of tags as a feature of the lifecycle management of objects in yuuvis® Momentum. In the "Tagging Objects for Processing" tutorial, an exemplary use case is explained.

Read on

Tagging Objects for Processing

Based on tags, you set up complex stateful processing chains. This tutorial describes how tags can be added, displayed, and updated in an example context. For this purpose, a typical application will be discussed: An import management system, which is an example for a processing chain, where tags are a helpful tool to describe the current status of each object. Keep reading

Schema - Defining Object Types

Detailing the available schema, object type definitions as well as property definitions. Keep reading

Changing Schema Structures ("Schema Flow")

This tutorial shows how to change your basic schema for individual instances of an object type during the entire lifecycle of a document. Classify objects at a later point in time, add or remove property groups at runtime by defining and referencing "floating" secondary object types. Keep reading