Tag an Entity via Flow

Last Updated: 12/06/2018 Introduced in Version: 2.0

A “tag,” a short, easily remembered name, can be assigned to entities such as documents, reports, forms, and flows. Users can enter tags when searching for an entity. Assigning the same tags to similar entities allows them to appear together in search results, and to be grouped together on reports. The Tags filter feature in a Designer Projects folder is a helpful way to quickly find entities with a certain tag.

A tag can be added manually or can be added using a flow. When creating a flow to add a tag to an entity, you must know the ID of the entity to add the tag to, and the object’s full type from the platform framework.

To add a tag to an entity using a flow, in the Flow Designer, drag an Add Tag component to the work space.
 

Example

This example will:

  1. Create a flow that adds a tag to a document.
  2. Run the flow.
  3. View the document to see that the tag has been added.
To begin, navigate to a project folder and click the Create Flow button. Name the flow and click OK.
 
 
Begin creating the flow by adding two components to the workspace.

From the Flow Designer start-up window, we want to find Fetch by ID step to pass the document that we want to tag to the Add Tag step later. In this particular case, we can tag an entity that exists in user defined type data folder. Here is the path for an existing Entity folder called Vehicle Passenger. In User Defined Types > Entities> VehiclePassenger , select a Fetch By ID component and click Add to add it to the workspace. 

10

 

 11
 
From the All Steps>Integration>Internal Services> TaggingService category, drag an Add Tag component to the workspace.   
 
Connect the outcome paths in the flow. Connect the Start step to the Fetch ID step, the Fetch ID step to the Add Tag step, then the Add Tag step to the End step.
8
 
 12
 
To define which document will receive the tag from the flow, click the start step and Add New Input Data under Flow Input Data as following.
13
 
Next, click Fetch By ID step and map ID under Vehicle Passenger to id.
14
 
Select on the Add Tag step and click the Show Mapping Editor link. 
 
In the Mapping Editor, define the four inputs to the Add Tag step.

Change the mapping type of the first input, objectID, to FetchByID_Output.ID.

15

 

 23-change-to-constant

We enter the object’s full type in the platform’s framework in the objectType Value field.

We enter a short name for the object type in the objectShortType Value field.

Finally, we set tag as constant and enter the tag that will be added to the document when the flow runs in the tag Value field as ‘Tagged Through Flow“.

 

27-input-add-tag-mapping 

This completes our mapping, so we click OK to save the changes and close the Mapping Editor.

Our flow is also complete, so we save the flow and run it in the Debugger.

Click Debug Flow to access the Debugger.

25-debug-flow

 

To see the flow’s execution, we click the Diagram tab. The flow completes with no errors. A tag is added to the document designated in the Mapping Editor.

 

 26-flow-execution

To view the document’s tag, we close the Flow Designer and navigate to the folder containing the document. We select it and select Add> Setup> Manage Tags in the lower right.

 

 28-manage-tags

The tag has been added to the document.

29-adding-new-tag-final-window 

 

Additional Resources