std.IndexDataChanged

This job informs the index server that the index data of an object has changed.

The job is a server-internal follow-up job and is generally not called from outside. There are two triggering paths:

The job does not change the index data itself — it was already written by the preceding write operation. Therefore, both the KernelBeforeJob and the KernelAfterJob server event (see server events) are triggered for this job only after the actual metadata change.

The changed metadata is not passed to the job as a parameter (see the input parameters — only Action, dwObjectID, dwObjectType, etc.). A server-event script that wants to react to the change must therefore load the current metadata itself.

1. Input Parameters

Name Type Required Description

Flags

INT

Yes

1 = the osowner field in the DB table objectXXX is changed;
otherwise osowner is not modified.

Action

INT

Yes

Action performed on the object (see action IDs below)

dwObjectID

INT

Yes

ID of the object

dwObjectType

INT

Yes

Type of the object

Info

STRING

Yes

Information written to the DB table osobjhist

GUID

STRING

Yes

Unique key for the DB table osobjhist

2. Action IDs

ID Description ID Description

1

Electronic signature

28

Object restored

2

Object created

29

Object permanently deleted

3

Index data changed

30

Acknowledgment confirmed

4

Document changed

31

Object info

5

Document archived

32

Object owner changed

6

Document deleted

33

Variant activated

7

Document issued

34

Variant deactivated

8

Document status changed

35

Variant deleted

9

Document status changed

36

Variant created

10

Document created

37

Typeless object assigned type

11

Link via notes

38

Document moved from archive

12

Link dissolved

39

Reference copy created

13

SQL query

40

User info

14

SQL command

41

Retention time set

15

Electronic signature

42

Document dearchived

16

Signed document deleted

43

Document type changed

17

Version created

44

Preview annotation created

18

Version deleted

45

Preview annotation changed

19

Restored from version

46

Preview annotation deleted

20

Full-text request

47

Acknowledgment confirmed by password

21

Document moved

48

Release created

22

Register moved

49

Release changed

23

Folder merged

50

Release deleted

24

Folder merged

51

Created from copy

25

Register merged

52

Removed from location

26

Register merged

53

Status 'active variant' changed

27

Object marked for deletion

54

Additional variant created

3. Common Actions (Example)

In practice, only a small subset of the actions listed above occurs for this job. The following values were actually observed in a production environment, together with the job that typically triggers them:

Action Meaning Triggering job

3

Index data changed

dms.XMLUpdate, dms.XMLImport (update branch)

2

Object created

dms.XMLInsert, dms.XMLImport (insert branch)

9

Document status changed

Status change when storing/writing a document back (std.StoreInWork, std.StoreInCacheByID, etc.)

7

Document issued

Requesting a document for editing (std.StoreInCache with a writing DocState)

The values were observed via job monitoring. Since the enaio® Windows Client calls the job itself (see the note at the top of this page), an execution observed this way may originate either from the server-internal path of the XML jobs or directly from the client.

4. Triggering by the DMS XML Jobs

Whether an XML job triggers the follow-up job depends solely on whether the submitted XML contains at least one <Field> (verified on enaio® 12.0):

Case Triggered Action

dms.XMLUpdate, field with a changed value

yes

3 (index data changed)

dms.XMLUpdate, field with an identical value

yes

3 (index data changed)

dms.XMLUpdate without any field (<Object/> without <Fields>)

no

dms.XMLImport, update branch, identical values

yes

3 (index data changed)

dms.XMLImport, insert branch

yes

2 (object created)

dms.XMLInsert

yes

2 (object created)

The server does not compare the submitted values against the stored ones. A value submitted unchanged counts as a write operation and triggers the follow-up job including a history entry in osobjhist. Only a request without any field at all stays silent — omitting unchanged fields from the XML is therefore the only way to avoid the history entry.

5. Using It as a Hook

There is no dedicated server event for index data changes. Two options exist for reacting to an index data change on the server:

  • Bind KernelBeforeJob or KernelAfterJob to this job (see Intercepting Index Data Changes). Both scripts run only after the change here.

  • Use OnObjectHistoryEntry (5011). The event is not job-bound and fires on every history entry.

A hook on dms.XMLUpdate covers the API path only and misses every change made by the enaio® Windows Client. Only std.IndexDataChanged sits on both write paths.

6. Return Value

(INT): 0 = Job successful, otherwise error code.