v2.6
Persisted Entities ​
Introduction ​
Persisted Entities are Entities that can be stored in a database.
These entities have a defined lifecycle that typically includes creation, updates, and eventual deletion. Persisted Entities are crucial in applications where permanent data storage is necessary, enabling data retrieval and management across ruleset executions.
Enabling persistency ​
Before you can use Persisted Entities, the Ruleset you're working in must be a Library and must have persistency enabled.
- Open a new Ruleset and go to the Ruleset's Version Settings in the left menu
- Check the 'Library' box
- Check the 'Allow persistency' box
This will not automatically make any Entity a persisted one.
- Create a new Entity
- Check the 'Allow persistency' box
- Save the Ruleset
This will change the Entity into a Persisted Entity.
How to use ​
There are a few ways to store, retrieve, update and delete Persisted Entities:
- Programmatically
- Within a Ruleset
- Through the API (api/persisted-entity)
- Form data table (See working-with-data-sources.md)
In this guide we will look at how to use Persisted Entities within a Ruleset.