Moving Folder Entities with the Flow Designer

Last Updated: 07/25/2018 Introduced in Version: 2.0

Overview

Folder entities can be moved with the Move Entity component. It can be found in the Toolbox tab, under the category Integration > Entity Framework.

Example

In our example flow, we will use two forms to move a CarPassenger entity from one Car folder to another. This example assumes that our two forms Display Passengers Form and Display Cars Form have already been designed.

selectPassToMove

 

We will begin in the Car folder’s behavior actions folder at System > Common Data Elements > Folder Behavior Actions > Transportation.CarFolderBehavior. We will click the Create Flow button.

createFlow

 

In the resulting New Flow pop-up, we will name our flow “Move Passenger” and click OK to open it in the Flow Designer.

nameFlow

 

We will first retrieve all of the Car Passengers in the current Car folder. We will find the Get All Car Passenger By Folder Id component in the Flow Designer start-up window, under the category Integrations >All Integrations > Folder Entity Data Structures > Car Passenger.

 

 flowStarts

In the Mapping Editor, we will map FolderId to Entity Folder Id. Throughout the rest of our example, we should remember that Entity Folder Id always refers to the ID of the folder which contains the entity.

mapToGetAllPass

 

Next, we will get the current Car folder. We will find the Get By ID component in the Toolbox tab, under the category Integration > Internal Services > CarService.

dragGetByID

 

In the Mapping Editor, we will map FolderID to id and rename the output to “Current Car Folder”.

mappingToGetByID

 

Next, we will get all of the Car folders. We will find the Get Folders By Behavior Type component in the Toolbox tab, under the category Integration > Internal Services > CarService.

dragGetFoldersByBehType

 

In the Mapping Editor, we will map Current Car Folder.EntityFolderId (the ID of the folder which contains our current Car folder) to parentFolderId. We will also define folderBehaviorTypeName as “Transportation.CarFolderBehavior” and rename our output as “Car Folders”.

mappingToGetFoldersByBehType

 

Next, we will place the form in which the user will select one of the Car Passengers in our current Car folder. We will find the Display Passengers Form in the Toolbox tab, under the category Forms [Interaction] > [Root Folder] > Designer Entities.

dragPassengersForm

 

In the Mapping Editor, we will map Results to CarPassengers.

mappingToPassform

 

Next, we will place the form in which the user will select a target Car folder to which the CarPassenger will be moved. We will find the Display Cars Form in the Toolbox tab, under the category Forms [Interaction] > [Root Folder] > Designer Entities.

dragDisplayCarsForm

 

In the Mapping Editor, we will give SeatPosition a mapping type of “Ignore” and map Car Folders to CarFolders.

mappingToDisplayCars

 

Next, we will move our selected Car Passenger to the selected Car and Seat Position. We will find the Move Entity component in the Toolbox tab, under the category Integration > Entity Framework.

dragMoveEntity

 

In the Mapping Editor, we will map CarPassenger.ID to entityId.

mapPassengerToMoveEntity

 

Next, we will map TargetCarFolder.FolderID to folderId.

mapTargetFolderToMoveEntity

 

Once we’ve connected the last of our outcomes, our flow will be complete, so we will save it and close the Flow Designer.

flowCompleted

 

Back in the portal, we will navigate to a Car folder that contains CarPassenger entities.

openFolderWithPassengers

 

In the resulting Car Passengers form, we will select a Car Passenger to move and click Done.

selectPassToMove

 

In the next form, we will select a target car and seat position, and then click Done.

 

The Car Passenger we selected will no longer appear in this Car folder.

mickeySmithIsNotInTheFolder

 

When we navigate to the target Car folder, we will see our CarPassenger entity.

resuly

 

Additional Resources