- 08 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Case Entity CRUD Actions
- Updated on 08 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Overview
Case Entity Data Structures are typically used to delineate non-linear, data-driven, or state-driven processes (e.g. order fulfillment). The following article will demonstrate how to use the Create, Update, and Delete steps in a Flow using a Case Entity Data Structure.
Example
In this tutorial, a Case Entity Data Structure was created with the following fields:
Person | |
Firstname | String |
Lastname | String |
DOB | Date time |
Case Entities store data in Decisions, however, users will have to create a Normal Folder to store the process data. In this example, a Normal Folder [Case Entity Person Data] was created.
Create
To create a record in the Person Case Entity Data Structure
- To begin, in a Designer Folder, select CREATE FLOW from the Global Action Bar.
- In the resulting Create Flow dialog, select and name the default Flow [Case Entity CRUD]. Click CREATE to enter the Flow Designer.
- In the Flow Designer, from the Toolbox > USER DEFINED TYPES > CASE ENTITY > PERSON, drag and connect a Create Person step to the Start and End steps.
- With the Create Person step selected, in the Properties panel > INPUTS > Extension Data field, change the input mapping from Unknown to Build Data.
- Notice the appearance of the Case Entity values "DOB", "FirstName", and "LastName". Change the input mappings on each from Unknown to Constant and input relevant example information.In this example, the inputs for the value fields are: DOB: "6/20/2021", FirstName: "Jill", and LastName: "Doe".
- Change the input mapping for INPUTS > Folder Description from Unknown to Constant and input a relevant description.
- Change the input mapping for INPUTS > Folder Name from Unknown to Constant and input a relevant name.
- Change the input mapping for INPUTS > Parent Folder ID from Unknown to Constant and select the Normal Folder previously created.In this example, the inputs for the value fields are: Folder Description: "Person Description", Folder Name: "Person Data", and Parent Folder ID: "Case Entity Person Data".
- Save and Debug the Flow.
- Click START DEBUGGING.
- The Flow ends successfully. Decisions has now begun a record in the Folder [Case Entity Person Data].
Update
To update an existing record in a Case Entity Data Structure, the Edit Person or the Selective Update Person steps will be used; these steps are found in the Toolbox > USER DEFINED TYPES > CASE ENTITY > PERSON section. The Edit Person step will change every data field in the object, even if only one data field has been changed; to change only one or more data field values and maintain the rest of the data field values the Selective Update step is recommended. In order to change any record in a Data Structure, the Fetch Entities step will be required to fetch a particular record and then it will pass the Id of the record to be changed into the Edit or Selective Update steps.
Edit Person step
Selective Update Person step
Delete
To remove records from a Data Structure, the recommended step is the Delete Person step found in the Toolbox > USER DEFINED TYPES > CASE ENTITY > PERSON. This step will expect an Id as an input. Once an Id has been provided, running the flow will delete that record from the Data Structure.