dms.WriteShadowData

This job writes shadow data (a shadow copy of selected index field values) for a DMS object. Shadow data is persisted separately from the main object and is used in particular:

  • as a snapshot before structural changes on the main object (audit / backup),

  • as a writable index copy when the original object is read-only due to retention / archiving,

  • as supply data for a secondary archive (e.g. a long-term archive) that needs to retain the index values without writing back into the main archive.

The data can subsequently be read back through dms.GetShadowData.

This job is not listed in the official enaio® DMS engine overview.

1. Input Parameters

Name Type Required Description

ObjectID

INT

Yes

Numeric ID of the DMS object.

ObjectType

INT

Yes

Object type ID of the DMS object (see Object type ID).

ArchiveType

INT

Yes

Target archive / type identifier for the shadow storage. Typically correlates with the main type of the object; differing values are possible when the shadow data is to be written into a different archive.

UserIdent

INT

Yes

Numeric user ID of the triggering user (for the audit trail and permission check).

Flags

INT

Yes

Reserved; always pass 0.

2. Output Parameters

Name Type Dependency Description

GUID

STRING

GUID of the newly created shadow entry. Empty ('') when no new entry was created — either because an existing entry was updated, or because no shadow data is configured for this object type / archive. return_code = 0 signals success in either case.

3. Return Value

(INT): 0 = job successful, otherwise error code (e.g. object does not exist, invalid ArchiveType, database error).

For further return values see Error Codes.

4. Notes

  • Idempotent — repeated calls with identical parameters typically result in an UPDATE of the existing shadow entry rather than an additional INSERT.

  • An empty GUID output is not an error (see parameter description).

  • dms.GetShadowData — reads shadow data back through the GUID from the history

  • dms.GetObjectHistory — returns the history of an object with the GUIDs that serve as the key for dms.GetShadowData

  • dms.XMLUpdate — XML-based index data update; depending on the configuration, implicitly triggers shadow-data writes

  • std.IndexDataChanged — signals to the server that the index data of an object has been changed — downstream components may update the shadow data accordingly