Moving Folder Entities with the Flow Designer
  • Updated on 09 May 2013
  • 3 minutes to read
  • Print
  • Dark
    Light

Moving Folder Entities with the Flow Designer

  • Print
  • Dark
    Light

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

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.
createFlow35.png

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

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 .

flowStarts8.png

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

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 .
dragGetByID1.png

In the Mapping Editor, we will map FolderID to id and rename the output to "Current Car Folder".
mappingToGetByID1.png

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

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

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

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

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

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

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

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

Next, we will map TargetCarFolder.FolderID to folderId .
mapTargetFolderToMoveEntity.png

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

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

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

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

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

Was this article helpful?