Adding Actions to Folder Entities with the Flow Designer

Last Updated: 03/28/2018 Introduced in Version: 2.0

Folder entity actions are actions which can be taken upon a folder entity. Custom folder entity actions are built in flows, and saved within a [MyFolderEntity] folder for the entity type, within a Designer  Folder.

Example

In our example, we will add an action to our pre-designed folder entity VehiclePassenger. This action will be called Change Seat Position. Using a form, it will allow us to change the seating position of a passenger while not exposing any other properties of the VehiclePassenger entity to change. The action will be for a single VehiclePassenger entity.

Our example assumes that we have already designed the Change Seat Position Form.

 
2017-02-14_101742
 
 
 
We will begin in the portal by navigating to the entity actions folder for our VehiclePassenger entity, which is created in a Designer Folder using the following option:
 
 
2017-02-10_095036
 
 
To create our action, within the Entity Action folder, click the Entity Actions > Entity Action button.
 
 
 
 
 

In the resulting New Flow pop-up, give this flow the name “Change Seat Position” and ensure that Base Entity Action Flow is selected as the type. In this example, the entity action is for a single entity. Click OK.

 

 

 

 

First, we will place the Get VehiclePassenger by Id component in the workspace. In this example, it is in the Flow Designer start-up window, under the category Integrations > All Integrations > Folder Entity Data Structures > VehiclePassenger.

 

2017-02-10_095545 
 

All flows created within an entity action folder will be pre-configured with the Entity ID of the folder entity to which the action applies. To retrieve our car passenger with the Get VehiclePassenger by Id component, we will map EntityId to the Id input. The output will be called “Result”.

 

2017-02-10_095657

 

Next, we will place in our workspace the form with which we’ll change a VehiclePassenger’s Seat Position property. We will find our pre-designed form in the Toolbox tab, under the category Forms [Interaction] > [Root Folder] > Designer Entities.

To configure this form, we will select it and map the following properties of the Result output to our form’s inputs: FirstName, LastName and SeatPosition.

 

2017-02-10_100122

 

Next, we will edit our VehiclePassenger to reflect the new seat position that was selected in our form. We will find the Edit VehiclePassenger component in the Toolbox tab, under the category Integration > Folder Entity Data Structures > Vehicle Passenger.

 

2017-02-10_100202

 

Next, we will map the inputs of the Edit CarPassenger component by selecting it and opening the Mapping Editor. First, we will change the mapping type of the Item to Edit input from “Unknown” to “Build Item”. Next, we will map the Seat Position output of our form to the SeatPosition input.

To ensure that all other properties of our VehiclePassenger remain unchanged, we must map the other properties of our VehiclePassenger (Result) to the Edit VehiclePassenger component’s inputs, with three exceptions.

 

2017-02-10_100331

 

When we edit a folder entity, some fields should not be mapped. For example, the ModifiedDate and ModifiedBy fields are automatically generated, so their mapping types can be left as “Ignore”. The ExtensionData field contains important technical variables which, if changed, may make the folder entity unusable. In this case, we will also leave its mapping type as “Ignore”.

With our mappings complete, we will click OK.

To complete our flow, we will connect the remaining outcomes, save it and close the Flow Designer.

Back in the portal, we will navigate to a Car folder which contains a VehiclePassenger entity.

 

2017-02-10_101625

 

Our VehiclePassenger – Anthony Young – has a Seat Position of Driver’s Seat. To change this, we will select the new Change Seat Position action.

 

2017-02-10_101714

 

In the resulting form, we will change Anthony Young’s seat position from Driver’s Seat to Back Seat, and then click Save.

 

2017-02-10_101835

 

Our VehiclePassenger will be updated with the new seat position, and we will see this in our report of Vehicle Passengers.

 

 2017-02-10_101905

Additional Resources