Entity Structure CRUD Actions
  • 06 Jun 2022
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Entity Structure CRUD Actions

  • Dark
    Light

Overview

This article will demonstrate performing Create, Read, Update, and Delete (CRUD) actions, via Flow steps, on Entities.

CRUD Action Steps: Entities 
These steps generally DO NOT appear in Steps Panel search results but can be found by navigating to the User Defined Types > Entities category.

Preparation 

Create an Entity Data Structure with with applicable attributes, such as the Person example below:

Person
FirstnameString
LastnameString
DOBDate time

Since Data Structure Entities are saved in Decisions, users will have to create a Normal Folder to store the created Entities. For this example, create a normal folder and call it "Person Entity Data Folder." 

Do Not Store Data in Configuration Folders
Case Entities utilize built-in Configuration Folders meant for storing Flows, Rules, and/or other Designer elements that enhance the custom data structure. It is NOT INTENDED FOR PROCESS DATA STORAGE.

Create 

To create a record in the Person Entity Data Structure:

  1. Create a Flow.
  2. Expand the User Defined Types category
  3. Expand the Entities category.
  4. Expand the Person datatype.
  5. Drag the Create Person step onto the Flow canvas.
  6. Connect it to the Start and End steps.
  7. Set Folder Id to a constant value, and Pick the Person Entity Data Folder.
  8. On the Item To Create input, change Unknown to Build Data.
  9. Set constant values for Name, Firstname, Lastname, and DOB.
  10. Click the Debug button to run the Flow; the record in the Person Entity Structure has been created.
  11. To view the record, navigate to the Person Entity Data Folder.
Auto ID Generation
Notice that the ID was automatically created when the flow was run, even though its input value was set to ignore.

Update

The Edit Person and Selective Update Person steps may be used to update an existing record in the Person Entity Structure; recall, these steps are nested in the Flow Steps panel under User Defined Types > Entities > Person.

'Edit Person' Step

Edit vs Selective Update
  • Edit Person step- changes ALL data fields, even if only 1 is specified
    • updates the specified data field(s) to the provided parameter(s)
    • overwrites non-specified parameter(s) to NULL (or Empty)
  • Selective Update Person step -  only changes the data field(s) specified
    • updates the specified data field(s) to the provided parameter(s)
    • ignores non-specified parameter(s), leaving existing data in tact

'Selective Update Person' Step

Delete

To remove a record from the Person Entity Structure, use the Delete Person step, found nested under User Defined Types > Entities > Person in the Flow Steps panel.  Once the required Id is provided as step Input, running the Flow will delete the record from the database associated with that Id.



Was this article helpful?