Operative Data
Integrations need state that outlives a single message: the current batch of employments that Konvoj pulls, the configuration of a file flow, the state of a long-running run, a tenant's settings. If every service kept that in a database of its own, nobody else could read it and klok.dev could show none of it. On Klok it lives in the tenant's Operative Data Layer (ODL), as objects of a datamodel, and Operative data is where you search, open and edit those objects with your own login.
- In the menu: Run → Operative data (
/odl) - For: developers and admins of the tenant or of a domain read and edit (a domain role reads its domain,
commonandpublic, and writes only in its own domain); platform staff - Reads: the tenant's ODL API (
klok-api-odl) with your own login; the objects are stored in OpenSearch by the platform's services, and klok.dev keeps none of them
What You See
| Screen | What it shows |
|---|---|
The models (/odl) |
Every model the ODL holds: its name, its full class name, how many objects it has, and its schema: a version such as v1 when a published datamodel schema describes it (linked to the datamodel's page), sampled when the fields are read from the stored objects. A domain filter narrows the counts; Open type… opens a model by its class name |
| A model's records | Free text search over any field, filter rows by field, sorting by a column, Load more for the next page, and New record |
| A record | Form, with the fields the schema describes (nested objects and lists edited as JSON one field at a time), and JSON, the whole object. Under it the record's facts: version, updated, domain and where the field descriptions come from. Save, Reload and, behind ⋮, Delete record |
Some of the models you meet in a tenant:
| Model | Kept there by | Shown also under |
|---|---|---|
| The current employment batch | KLK010, for Konvoj to pull | — |
KlokFileFlowV1, KlokFileFlowStatusV1, KlokFileTransferV1 |
klok.dev and klok-file-transfer (KLK017) |
File Flows |
KlokTaskV1, KlokProcessDefinitionV1 |
The task materializer and klok.dev (KLK002) | Process Runs |
KlokDataModelSchemaV1 |
klok.dev, from tenant klok's datamodel builds: the schemas the forms here are built from | Datamodels |
KlokLogAnalysisConfigV1, KlokDocumentationConfigV1 |
klok.dev, in tenant klok's ODL: each tenant's settings | Logs → Settings, Documentation → Generation |
Walkthrough: Find A Record
-
Open a model by its name, for example
KlokTaskV1, the runs of Process Runs. -
Type in the search box: the search covers every field, and the list follows as you type. Here Home care South finds the schedule exports of that group.
-
Open a record by its id. JSON shows the whole object: the failed export from Process runs, with its name, its status and its error, is this record.
Walkthrough: Change A Record
-
Open the record. The form follows the datamodel's schema: an enum is a select, a boolean a switch, a time a date field; here the process definition of the example employments file, the same object Process runs → Processes shows.
-
Change the field and choose Save. The record is replaced as a whole, with your login, and only if nobody has written it since you read it. A toast says Saved … (version N).
-
If someone else wrote the record in between, the ODL refuses the save and klok.dev asks: Reload to see their version and lose your edits, or Overwrite to save yours over theirs.
Delete record removes the record at once, and it cannot be undone. Change the services' own records only when you
know why: the task materializer is the only writer of a run's KlokTaskV1, klok-file-transfer writes a file flow's
status, and both go on writing them.
What Happens In Git
Editing a record does not write to Git: the ODL is operational state, not configuration in a repository.
| In klok.dev | Where it lands | Approved by | By hand |
|---|---|---|---|
| Save | PUT /api/odl/{type}/{id} on the tenant's ODL API with your login, conditional on the version you read; the ODL publishes a change event for the write |
Nobody: a developer or admin of the record's domain saves | The same PUT with curl and your token |
| Delete record | DELETE /api/odl/{type}/{id}, immediate |
Nobody | The same DELETE |
| The first write of a new type | Before it, klok.dev declares the type's change event topic, KlokOdlObjectEventV1_<Type>, in the tenant's Pulsar file in klok/environment/klok-environment-setup, merges that itself and applies it, because the broker creates no topics |
klok.dev, by rule | The same line in the Pulsar file in a merge request, applied with Ansible |
An object written by a route or by hand shows up on the next refresh, since klok.dev caches nothing. See What klok.dev Does In Git for every page.
Who Does What
| Automation | Kloker | You |
|---|---|---|
The tenant's services keep their state here and read each other's. Every write ends in a change event that other services follow, the way klok-file-transfer follows a saved flow. Only klok-egress-opensearch talks to OpenSearch; the APIs reach it over the broker. None of it uses AI |
As beside every page, Ask Kloker answers questions about what you see and can put a value into a field on screen; it never saves | Read and edit with your own login, choose on a conflict, delete with care |
See You, The Automation And Kloker.
How It Connects
Operative data is the bottom of the Run pages: File Flows and Process Runs are views of objects in the same ODL, and the settings under Logs and Documentation are kept there too. The forms are built from the schemas published with the datamodel builds (Datamodels); a model without one gets its fields from the stored objects. Every request and change event travels on the broker (Broker). See How The Run Pages Fit Together.
A tenant whose own ODL has not been set up sees not activated for this tenant, and nothing falls back to another tenant's ODL.
Read More
- klok.dev's reference for the screens, the roles and the tokens: The Operative Data Layer
- Using Datamodels In The ODL: how a route stores, reads and searches objects
- The routes' side: ODL