- 27 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Flow Execution Extension CRUD Actions
- Updated on 27 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Overview
The Flow Execution Extension Data Structure is primarily used to store data that goes through states in chronological order. This Data Structure uses Process Folders to track states, assignments and store files within them. These Process Folders will contain the data created when a user runs a Flow that creates a record. Process Folders are most commonly stored within a normal Folder.
In the Toolbox, the Create, Update, and Delete steps cannot be searched for. Users will have to navigate to USER DEFINED TYPES > FLOW DATA EXTENSIONS to add CRUD actions to the workspace.
Prerequisite
In this tutorial, a Flow Execution Extension was created with the following fields:
Employee_FlowExec | |
---|---|
FirstName | String |
LastName | String |
String |
Flow Execution Extensions store data; however, users will have to create a normal Folder to store the process data. In this example, a normal Folder called FlowExec_Employee Data.
Setup Process Folder
- In a Designer Project, click CREATE FLOW and create a new Flow.
- In the Toolbox panel, navigate to the PROCESS category and attach a Setup Process Folder step to the workspace and connect it to the Start and End steps.Flow Execution Extension Data Structures do not have a Create step like other Data Structures. In order to create a record in a Flow Execution Extension Data Structure, a Setup Process Folder step is necessary.
- On the Properties panel, click PICK under the Parent Folder field and select the folder FlowExec_Employee Data. Select the Use Extension Data option and use the dropdown list to select the Flow Execution Data Structure.
- In the Extension Data field, change the input mapping to Build Data. Set the Email, FirstName, and LastName fields to Constant mapping and enter values for each.
- Set the Folder Description and Folder Name fields to Constant mapping and enter values.Auto-ID GenerationThe Id field is automatically created when the Flow runs even though the input value is set to Ignore.
- On the top action bar, click Debug.
- Click START DEBUGGING. This will create data in the folder.
Update
Flow Execution Extensions do not have an Edit or Selective Update step like other Data Structures. In order to update the Flow Execution Extension Data Structure, the Save step is required.
- In the Flow Designer, attach a Fetch Entities step to the Start step to fetch all the entities in the Flow Execution Data Structure.
- Connect a ForEach Step to the Results path. Map EntityResults to the Collection field and select the Flow Execution Extension Data Structure.
- Attach a Show Form step to the Next path and create a new Form.
- Configure the Form to have three TextBoxes (FirstName, LastName, Email) and Button (Update) controls. Click Save and close the Form.
- Under the INPUTS category, map the fields by selecting Select From Flow and selecting the respective values from Item. Under the OUTPUTS category, change the mapping for each field to Change Value. Under the Item category, select the respective field and click PICK.
- In the Toolbox panel, navigate to USER DEFINED TYPES > FLOW DATA EXTENSIONS > EMPLOYEE_FLOWEXEC and attach a Save step to the Update path.
- On the Properties panel, map Item to the Value field.
- Connect the Done path of the Save step to the ForEach step. Connect the Done path of the ForEach step to the End step. Click Save to save changes to the Flow.
- On the top action bar, click Debug.
- Click START DEBUGGING.
- After the debugger runs, update the fields that are displayed and click Update to have the changes saved.
Delete
With a Flow Execution Extension Data Structure, the steps used to delete records are the Delete and Delete Object steps. The Delete Object step will delete a specific piece of the record and the Delete step will delete the entire record.