Adding an event type
Use this page to add an entry to the event registry, to switch an event on or off, or to remove an entry.
Read first what the registry really does: only the Active switch has an effect, and only for the record-change events bio.{table}.{operation}. See Event registry.
Before you start
- You hold the role
ADMINand can open Enterprise. - You know the exact
Code. A code you invent does not make the system write an event: the events are written by the program. The registry only lists them and, forbio.*codes, allows or stops them. - For a record-change event, the code is
bio.{table}.{operation}, for examplebio.receipt.after_insert. The table name and the operation (after_insert,after_update,after_delete) must match what the system builds (crates/libs/wms-lib-core/src/model/base/crud_fns.rs:633).
Steps: switch a record-change event on
- Switch to Enterprise.
- Open
Integration > Event Registry. - Type the code in the filter of the column
Code, for examplebio.receipt. - Click the row of the event you want, for example
bio.receipt.after_insert. - Tick
Active. - Click
Save. You go back to the list.
From then on, each time a receipt is created the system writes the event, and the Event monitor lists it.
Steps: add a new entry
- Open
Integration > Event Registryand clickNew. - Fill
Code,NameandCategory.Descriptionis optional. - Keep
Activeticked, unless you want the entry off. - Click
Save.
Steps: delete entries
- In the list, tick the entries.
- Click
Delete. The message is{n} Event Registry record(s) deleted.
The entries are deleted one by one. If one fails, the ones before it stay deleted.
Nothing stops you from deleting an entry that came with the product (Builtin on). If you delete a bio.* entry, that event is no longer written.
What changes
| What | Change |
|---|---|
Table enterprise.event_registry | A row is added, changed or deleted. |
| Event writing | For a bio.* code, switching Active on or off starts or stops the writing of that event. Other codes: nothing changes. |
| Bindings | Deleting an entry deletes the rows of enterprise.event_binding that point to it. |
The registry is not audited: EventRegistryBmc has no audit event.
What can go wrong
| Problem | Meaning | Fix |
|---|---|---|
Duplicate entry on event_registry (constraint ...) | The code exists. | Open the existing entry. |
No event appears after you ticked Active | The code does not match what the system builds, or nothing has been saved in that table since. | Check the code against the list of bio.* rows, and save a record of that table. |
Switching a process.* entry off does not stop its events | The business code does not look at the registry. | None. This is how it works. |
Related pages
- Event registry
- Event monitor
- Subscribers
- API:
create_event_registry,update_event_registry,delete_event_registry. RF terminal: none.