Developer Documentation
This section is for developers who add their own business logic to EP — calculations, checks, integrations with other systems, generated documents.
Two Ways to Add Business Logic
In EP, business logic runs as an operation. An operation is attached to an entity type and started either by a user (as an action — a button on the entity) or automatically (as a hook — on create, update or status change). There are two kinds of operations:
| Lua Script Operations | Service Functions | |
|---|---|---|
| Runs | Inside EP | In your own service, outside EP |
| Written in | Lua | Any language (Python, Go, Rust, Java, …) |
| Reaches EP data | Directly: reads and changes entities in one atomic run | Receives the entity in the request; writes back through the REST API |
| Good for | Small calculations, checks, setting values, creating related entities | Integrations with other systems, heavy computation, generating files, existing libraries |
| Deployment | Nothing to deploy — the script is part of the data model | You run and operate the service |
Both kinds are attached to entity types the same way — see Actions in the admin documentation and Actions & Hooks for the meta model.
Further Reading
- Actions & Hooks — how operations are declared, hook events, veto rules
- Lua Scripting — key, label and virtual property scripts
- REST API Reference — reading and writing entities from your service