Standard Engine (Engine std)
In the Standard Engine, functions for file-oriented document management are implemented. These are particularly functions for storing and loading documents, archiving and realizing document exchange between multiple servers.
The Standard Engine is subject to the management of the Work, Cache and Archive areas of the application server.
6. Capture and Processing Messages (CP)
6.1. Mechanism
The Content and Processing mechanism (CP) handles the asynchronous handover of jobs between
the enaio® server and external service instances — typically the full-text indexer, the
rendition cache and the page-count service. The jobs are kept on the server in the
oscpmqueue database table; service instances pull them out,
process them and report completion back to the server.
Every job (CP message) is identified by a MessageGUID and assigned to a logical queue (the
queuename column). A service instance identifies itself to the server through a
ServiceName (instance ID) and pulls jobs from one or more named queues.
6.2. Lifecycle of a message
-
Create — Jobs are inserted into
oscpmqueueon the server, either explicitly throughstd.CreateCPMessagesor via internal triggers (for example after an index data change).lock_serviceis initiallyNULL, so the message is unreserved. -
Pick up — A service instance calls std.GetNextCPMessage in a polling loop. The server reserves a message for that instance if one is available and returns
MessageGUID,ObjectID,ObjectTypeandQueueName. An empty response (MessageGUIDempty, return code still0) is normal and simply means no free message is currently waiting in the requested queues. -
Process — The service instance executes the job. Typical follow-up jobs are std.GetCPObjectInfo for object metadata and std.GetCPObjectIdxFulltext for an object’s extracted full-text content.
-
Dispatch — When done, the service instance reports the result back through std.DispatchCPMessage together with a
Reason. The server removes the message from the queue or keeps it for a retry, depending on the reason. Without aDispatchcall, the message remains reserved withlock_serviceset. -
Reset — If a service instance aborts or restarts, it can release all reservations it currently holds by calling std.ResetServiceCPMessages. The affected jobs then become available again for other instances to pick up.
In addition, the rendition service reports a changed rendition back to the server through std.CPRenditionChanged, which in turn may produce new full-text messages.
6.3. Selection and locking behaviour
Out of the unreserved messages in the requested queue, the server picks the one with the most
recent entry (MAX(created)) — i.e. the newest message first.
The reservation uses optimistic locking: lock_service and a freshly generated checkguid
are written only if the message is still unreserved at the moment of the update. The server
then reads back the checkguid and compares it against the value it just wrote. If they
differ — typically because a competing service instance reserved the same message at the same
time — the pickup counts as lost and the service instance receives an empty response.
6.4. Coalescing of redundant messages
When a message is successfully picked up, the server deletes all other unreserved messages
for the same (osid, queuename) pair. Multiple jobs queued in quick succession for the same
object are thus automatically collapsed into a single processing step; the service instance
always works on the most recent state.
6.5. Known queues
| Queue | Typical consumer | Purpose |
|---|---|---|
|
Full-text indexer |
Register an object for full-text indexing. |
|
Full-text indexer |
Index the full-text document (read the content from the full-text cache and add it to the index). |
|
Full-text indexer |
Filter / pre-processing step prior to indexing. |
|
Full-text indexer |
Location / container indexing (typical for folder objects). |
|
Full-text indexer |
Remove the index entry for a deleted object. |
|
Rendition cache |
Produce a rendition (e.g. PDF or text extraction) for a document. |
|
Rendition cache |
Reset and rebuild the rendition cache. |
|
Page-count service |
Determine the page count of a document and store it in the index. |
| A service instance may serve several queues simultaneously; the "queue → consumer" mapping above reflects the typical configuration and is not enforced by the server. |
7. Undocumented Endpoints
The following jobs are offered by the enaio® server in the std engine but are not currently described in this documentation:
- Capture and processing messages (CP)
-
std.GetCPMessageStatistics,std.GetCPObjectFulltext,std.ProcessPageCountCPMessages,std.ResetCPMessage,std.ResetSelectiveCPMessages - Work directory
-
std.CopyInWork,std.DeleteInWork - Archiving and status
-
std.SetArchivableFlag,std.StoreInArchive - Full text
-
std.DeleteFulltext - Other file and document management
-
std.CalcDocumentMimeType,std.ConfigMedienExt,std.CopyRemark,std.DirectTransformObject,std.GetDocSize,std.GetDocumentRetentions,std.GetDocumentsForAxachash,std.GetMediumSizes,std.GetMigrationObjectInfo,std.GetNextInteger,std.GetVarcInformation