Tag an Entity via FlowLast Updated: 02/15/2016 Introduced in Verision: 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 workspace.
This example will:
- Create a flow that adds a tag to a document.
- Run the flow.
- View the document to see that the tag has been added.
From the Flow Designer start-up window, in the category Integrations > All Integrations > Internal Services > DocumentService, select a GetAll component and click Add to add it to the workspace.
This component tells the flow what entity type, in this case a document, to add the tag to. The document itself will be specified using the Mapping Editor.
In the Mapping Editor, define the four inputs to the Add Tag step.
Change the mapping type of the first input, objectID, to Constant.
Paste the entity ID for the document to be tagged into the Value field.
We set the mapping type for the remaining three objects to Constant as well, and enter data in the Value field for each.
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 enter the tag that will be added to the document when the flow runs in the tag Value field.
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.
Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.
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.
To view the document’s tag, we close the Flow Designer and navigate to the folder containing the document. We select it, and select Manage > Manage Tags in the lower right.
The tag has been added to the document.