The event load uses the Event data format. Each message contains one or more event objects in an array. The event load must be authenticated by the instance user, who is then used as the instance uuid.
Each file info object within the event_attachments array must contain a uuid property.
Using curl as an example, an event is loaded using
curl -X POST @event.json "dhinstance/load/event_with_worker/put?process=true"
An authorization header would also be required.
The load source entity:
- Uses the Child Entity To Worker Group Message Reader to read all the worker group (folder) definitions from the document record. The connection information is translated to worker groups.
- Loads the worker groups.
- Triggers the message to be reprocessed using the event_with_worker2 source entity.
The event_with_worker2 source entity:
- Uses the Event And Worker Message Reader to:
- combine the worker into the event message,
- format the worker_connections so that they can be loaded into the worker_connection table, and
- format the event_attachments array so that the attachments can be loaded into the event_attachment table.
- Loads the worker, with associated worker connections and links to worker group, instance and parent worker.
- Loads the event with a link to the worker and loads the associated event attachments each with a link to insight_file, creating instance_file rows if necessary.
Two source entities are required because the denormalisation required to load worker groups is different from that required to load workers and events.