- 20 May 2022
- 1 Minute to read
- Print
- DarkLight
Case Entity CRUD Actions
- Updated on 20 May 2022
- 1 Minute to read
- Print
- DarkLight
Overview
This article will review the use of Create, Read, Update, and Delete (CRUD) actions, via Flow steps, for Case Entities.
Preparation
Create a Case Entity Data Structure with applicable attributes, such as the Person example below:
Person | |
Firstname | String |
Lastname | String |
DOB | Date time |
Now, create a Folder to store Case Entity process data (ex: "Person Case Entity Data").
Create
To create a record in the Person Case Entity Data Structure
- Create a Flow.
- Expand the User Defined Types category.
- Expand the Case Entity category.
- Expand the Person data structure.
- Drag the Create Person step onto the Flow canvas.
- Connect it to the Start and End steps.
- Set Parent Folder ID to a constant value and Pick Person Case Entity Data.
- Change the Extension Data input mapping to Build Data.
- Set constant values for Folder Name, Folder Description, Firstname, Lastname, and DOB.
- Click the 'Debug' button to run the flow. Decisions will create that record in the Person Case Entity Structure.
Update
The Edit Person and Selective Update Person steps may be used to update an existing record in the Person Database Structure; recall, these steps are nested under User Defined Types > Case Entity > Person in the Flow Steps panel.
'Edit Person' Step
- 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 data structure, use the Delete Person step, nested in the Flow Steps panel under User Defined Types > Case Entity > Person. Once the required Id is provided as step Input, running the Flow will delete the record from the database associated with that Id.