About Recipes
Introduction
Logic Recipes act as a structured timeline for executing programs on specific entities. Think of them as a sequence of events that dictate how and when certain logic should be applied during an entity's lifecycle—be it during creation, updating, or deletion. They allow us to:
- Define and enforce validation checks before any changes are made.
- Specify the exact sequence of operations that occur before and after creation, updating, or deletion of an entity.
- Use previously created logic flows and blocks as the building blocks to execute the desired operations.
In essence, recipes connect the dots and ensure that the right logic is executed at the right time, offering a holistic approach to managing entity lifecycles.
Recipe Properties
Every recipe has certain details or properties that describe it. These properties give us information about the recipe, like its name, the project it's associated with, the entity it works on, and more. Let's look at these properties:
| Property | Required | Description |
|---|---|---|
| Entity | Yes | The entity the recipe operates on. |
| Logic Recipe Name | Yes | The name of the recipe. |
| Project | Yes | The project to which the recipe belongs. |
| Logic Recipe Description | No | A brief description of what the recipe do. |
| Disabled | No | Specifies if the recipe is active (yes/no). |
Recipe Stages Overview
Recipes in FlowOn are like guidelines for managing your data. They set the rules for actions like creating, updating, or deleting data. To help you get a grasp, we've laid out the main operations and their steps in the table below.
| Operation | Stage | Description |
|---|---|---|
| Create | Validate | Ensures data integrity and consistency before the creation of a record. |
| Before | Processes that need to be executed before the actual creation of the record. | |
| After | Processes that occur right after the record has been created. | |
| Update | Validate | Ensures data consistency and validity before updating a record. |
| Before | Actions that are run before the actual update of the record. | |
| After | Actions that take place immediately after a record update. | |
| Delete | Validate | Checks the relevance and integrity of data before its deletion. |
| Before | Processes that occur before the deletion of a record. | |
| After | Tasks that are executed after the record has been deleted. |
That gives you a snapshot of recipes in action. Up next, we'll dive deeper into each stage to see how they really work.