Working with Taxonomies
In WSO2 ES, the Taxonomy feature allows the admin of an organization to define the Taxonomy as an XML representation so that Store users can discover assets by navigating to a set of groupings organized into a hierarchy. Furthermore, the asset publisher can assign an asset to a grouping within the Taxonomy, based on a defined taxonomy.
Defining a taxonomy hierarchy
The WSO2 ES administrator is the only user who is authorized to define the taxonomy hierarchy and manage the permissions with regard to the taxonomies via the WSO2 ES Management Console. Follow the instructions below to define a taxonomy hierarchy:
Step 1 - Configure the taxonomy hierarchy
Follow the instructions below to configure a taxonomy hierarchy:
- Step 1.1 - Define the taxonomy hierarchy
- Step 1.2 - Configure the RXT definition based on the taxonomy hierarchy
Step 1.1 - Define the taxonomy hierarchy
Follow the instructions below to define a taxonomy hierarchy:
- Sign into the WSO2 ES Management Console.
- Click Extensions, navigate to the Configure menu and click Taxonomy.
- Click Add new Taxonomy.
Define the taxonomy and click Save. For more information, see Taxonomy definition.
WSO2 ES ships a taxonomy template by default. If required, you can use the default definition as it is, you can customize the definition based on your requirements or you can define the taxonomy from scratch.The elements that are present in the taxonomy definition are explained as follows:
The Taxonomy IDs can not be duplicated in the Taxonomy node definition or across separate Taxonomies. For example, if there is a Taxonomy named Team and Service, the Taxonomy IDs defined in the Team and Service Taxonomies should be unique.
This is the main taxonomy element. You need to have the
id
andname
attribute for the taxonomy file. WSO2 ES uses the name attribute to distinguish the taxonomy definitions and the name of the taxonomy is displayed in the WSO2 ES Management Console taxonomy list, Publisher taxonomy view, and Store taxonomy view.<taxonomy id="teams" name="Teams"> </taxonomy>
Do not use special characters (especially # and -) for the Taxonomy
id
andname
.The
r
oot
element, which also has anid
andname
as attributes, is used as the topmost level to wrap the taxonomy hierarchy content. Unlike thenode
element display names, theroot
element display names are not displayed anywhere. However, when you add a taxonomy for an asset the taxonomy is stored with theroot
element (e.g.,wso2teams/ engineering/...
).<taxonomy id="teams" name="Teams"> <root id="wso2teams" displayName="WSO2 Teams"> </root> </taxonomy>
Do not use special characters (especially # and -) for the root
id
. You can use special characters for the rootdisplayName
with the exception of the following.#
- -
The
node
element is displayed in the Publisher and Store taxonomy view, under its respective taxonomy name. You can use the node element to write a tree-structured taxonomy hierarchy.<taxonomy id="teams" name="Teams"> <root id="wso2teams" displayName="WSO2 Teams"> <node id="engineering" displayName="Engineering"></node> </root> </taxonomy>
Do not use special characters (especially # and -) for the node
id
. You can use special characters for the nodedisplayName
with the exception of the following.#
- -
Use nested
node
elements to define children nodes. For example, the following code snippet describes the way in which theES/GReg
child node is defined for theEngineering
parent node.<taxonomy id="teams" name="Teams"> <root id="wso2teams" displayName="WSO2 Teams"> <node id="engineering" displayName="Engineering"> <node id="esgreg" displayName="ES/GReg"> </node> </node> </root> </taxonomy>
When writing a new taxonomy file, please maintain unique ids for each element. Furthermore, the
id
should not have special characters.Define global taxonomies as follows:
When you create a global taxonomy file, it will automatically be available for all asset types without enabling specifically. Make a normal taxonomy a global taxonomy by adding a new attribute namedglobal="true"
in the taxonomy main element as follows:<taxonomy id="teams" name="Teams" global="true" > </taxonomy>
Click Save to save the taxonomy definition.
Step 1.2 - Configure the RXT definition based on the taxonomy hierarchy
Follow the instructions below to configure the RXT definition based on the taxonomy hierarchy:
In the following instructions, it is assumed that you have already signed into the WSO2 ES Management Console.
- Click Extensions, navigate to the Configure menu and click Artifact Types.
- Click Add new artifact if you wish to configure a new artifact with the newly added taxonomy, or click View/Edit if you wish to configure an existing artifact with the newly added taxonomy.
- Update the RXT definition as follows:
Define the taxonomy in the RXT.
Define each Taxonomy under a separate<taxonomy>
element. Furthermore, the taxonomyname
attribute should be identical to the name defined in the taxonomy file.If you wish to define only one taxonomy, nest one
<taxonomy>
element within the<taxonomies>
element.Example<taxonomies> <taxonomy name="Teams" /> </taxonomies>
If you wish to define multiple taxonomies, nest multiple
<taxonomy>
elements within the<taxonomies>
element.<taxonomies> <taxonomy name="Teams" /> <taxonomy name="Locations" /> </taxonomies>
If required, disable global taxonomies being auto-inherited into the specific RXT type by adding an attribute named
excludeGlobal="true"
into the<taxonomies>
element.Example<taxonomies excludeGlobal="true"> <taxonomy name="Teams" /> <taxonomy name="Locations" /> </taxonomies>
If you were in the process of configuring an existing artifact, restart the WSO2 ES Server.
Skip this step in the following instances:
If you configured a new artifact.
If you have enabled hot deployment in WSO2 ES.
Step 2 - Manage the taxonomy permissions
The admin can grant multiple users the permission to manage the Taxonomy hierarchy.
Follow the instructions below to grant the taxonomy management permission to a specific user.
In the following instructions, it is assumed that you have already signed into the WSO2 ES Management Console.
- Click Main, navigate to the Users and Roles menu and click List.
- Click Roles.
- Select a specific user and click Permissions.
- Click on the Taxonomy option to grant the selected user with the Taxonomy permission.
- Click Update.