Adding Actions to Folder Entities with the Flow Designer

Last Updated: 07/29/2016 Introduced in Verision: 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.

 
form 
 
 
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:
 add entity conf
 
 
To create our action, within the Entity Action folder, click the Create Action button.
 create action
 

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.

nameFlow

 

 

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.

 

 flowStarts

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”.

mapInputs

 

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.

formAdded

 

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.

mapInputsToForm

 

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.

editPass

 

Next, we will map the inputs of the Edit VehiclePassenger 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.

SeatPosInput

 

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.

finalMapping

 

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.

finalMapping1

 

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

saveFlow

 

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

backToFolder

 

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

newAction

 

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

workingFlow

 

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

done

 

Additional Resources