Adding Actions to Folder Extensions with the Flow DesignerLast Updated: 07/29/2016 Introduced in Verision: 2.0
Folder extension actions are any actions that can be taken on a folder of that folder extension type. To create a new folder extension action in the Portal, navigate to the Folder Behavior Actions Folder generated for the data structure, and select the Create Flow button.
In the resulting New Flow pop-up, we will call our action “Edit Car” and click OK to open it in the Flow Designer. Ensure that Base Folder Behavior Action Flow is the type selected.
To edit our folder, our flow must first get the folder using the Get Vehicle component.
The Get Vehicle component is in the Flow Designer start-up window, under the category Integrations > All Integrations > Folder Extension Data Structure > Vehicle.
As a folder extension action, our flow comes preconfigured with an input called FolderId. This is the ID of the folder where the action is occurring. Map FolderId to the Id input of the Get Vehicle component.
Next, rename the output “Result” of our Get Vehicle component to “Car” Expand the Forms [Interaction] > [Root Folder] > Designer Entities category of the Toolbox panel, and drag Edit Car Form to the workspace.
Next, select the Edit Car Form step and map the properties of the Car folder we retrieved earlier to the inputs of our form.
Next, perform the actual editing of our folder with the Edit Vehicle component. We will find it in the Toolbox panel, under the category Integration > Folder Extension Data Structure > Vehicle.
Next, map the inputs that are necessary for the Edit Vehicle component to work. Begin by mapping FolderId directly to FolderId. To edit the additional properties of our folder, change the mapping of ExtensionData from “Unknown” to “Build Data.”
Next, map the outputs from our form to their respective properties in the Car we’d like to edit. We will also be sure to change the mapping type of ExtensionForType from “Ignore” to “Null”. Not changing this mapping will generate a fatal error in our flow.
When we edit our folder, we would like the name of our folder to reflect the updated properties as we’ve set them in our form. To do this, we will change the mapping type of FolderName to Merge Plain Text and, in the Merge Text Editor, define a name that includes our Car’s year, make and model.
This completes our flow, so we will save it and close the Flow Designer.
Now, when we navigate to a Car folder (eg, Honda Civic), we will see a new action called Edit Car.
When we select this action, we will be shown a form that is pre-populated with the properties of this Car folder. In this example, our Car was originally defined as a blue 2011 Honda Civic. Using this form, we will redefine this car as a red 2009 Chrysler LeBaron, and click Save.
When we update the portal, we will see that the folder details have been updated and the folder name has changed.