Creating Entity Events
- 28 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Creating Entity Events
- Updated on 28 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Entity Events run a Flow when certain events occur to an Entity, such as the saving of an Entity. For example, an Entity event could be to insert an audit record into a database or directory when an Entity is deleted that records details such as who deleted the Entity. Entity Events require a Data Structure with a Configuration Folder.
Event Types
Type of Events | Function |
---|---|
After Delete Flow | A Flow runs after a Delete is made to the Entity to save the changes. |
After Save Flow | A Flow runs to save the changes after a flow is changed. |
Before Delete Flow | A Flow runs before a Delete is made to an Entity to save the data. |
Before Save Flow | A Flow runs before a save is made to an Entity to save the data. |
Entity Events will run every time an Entity of the type is saved. Please take care to not use any save or assigned steps that could cause this Entity to be saved in a cycle.
Example
- Using an existing Data Structure, navigate to its Configuration Folder. Click ENTITY EVENTS and select After Save Flow.
- From the Toolbox panel, attach a Show Popup step to the Start and End steps. On the Properties panel, enter Constant values for the Subject and Message fields. Click Save and close the Flow Designer.
- In the Designer Project, click CREATE FLOW to create a new Flow.
- In the Toolbox panel, navigate to USER DEFINED TYPES > ENTITIES > [NAME OF ENTITY STRUCTURE]. Select the Create step and attach it to the Start and End steps.
- On the Properties panel, click Unknown and select Constant for the Folder Id field. Click PICK and select a folder to store the values. Set the Items to Create to Constant mapping and set the fields for the entity. Click Save to save changes to the Flow.
Debug
- On the top action bar, click Debug.
- Click START DEBUGGING.
- After the debugger runs, the Entity Event Flow will also run and display the popup.
For further information on Data Structures, visit the Decisions Forum.
Was this article helpful?