Creating Entity Events
  • 28 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Creating Entity Events

  • Dark
    Light

Article Summary

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 EventsFunction
After Delete FlowA Flow runs after a Delete is made to the Entity to save the changes.
After Save FlowA Flow runs to save the changes after a flow is changed.
Before Delete FlowA Flow runs before a Delete is made to an Entity to save the data.
Before Save FlowA 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

  1. Using an existing Data Structure, navigate to its Configuration Folder. Click ENTITY EVENTS and select After Save Flow.
  2. 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.
  3. In the Designer Project, click CREATE FLOW to create a new Flow.
  4. 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.
  5. 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

  1. On the top action bar, click Debug.
  2. Click START DEBUGGING.
  3. 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?