Lead your team forward
OCT 24 / 9AM ET Register nowTraits
You can use traits to further configure entities and their properties in ONE, mainly to change their appearance or introduce additional functionality or behavior.
For example, the term
entity has the following traits assigned:
-
fe:mmdEntity
: Lets you change the default icon or set the display name for the entity in singular and plural form. -
core:copyable
: Makes the Duplicate button available on instances of this entity. This lets you easily create copies of a particular asset. -
relationships:enabled
: Makes the relationship graph available for this entity.
There are two types of traits used in the application:
-
Traits on properties.
-
Traits on entities.
Common use cases
See the following examples of common use cases for traits.
Change the display name and icon of an entity
When you create a custom entity, by default, the display name of the entity is derived from a transformation of the entity name. For example:
-
'certificationExample' would display as 'Certification example'.
-
'kpi' becomes 'Kpi'.
The custom entity is also assigned a default icon that is displayed in the navigation bar and in the relationship graph.
You could edit the navigation item of the entity in Organization > Navigation to configure the name and icon that are displayed in the navigation. However, this does not work globally.
To specify the icon and the display name in singular and plural forms globally, you can use the fe:mmdEntity trait
.
For example, if you assign the fe:mmdEntity
trait to the keyPerformanceIndicator
and configure its properties as follows:
{
"iconName": "book",
"displayNameSingular": "KPI",
"displayNamePlural": "KPIs"
}
The keyPerformanceIndicator
is displayed with the specified icon and singular and plural names where appropriate.
To see the available icons and their names:
Make sure you specify the
|
Change the display name of a property
Display names of properties are automatically derived from the property name. For example:
-
The property 'businessDefinition' becomes 'Business definition' in the UI.
-
'cisoApprovedBy' becomes 'Ciso approved by'.
This does not work well for properties that need a more descriptive display name.
To change the display name, assign the fe:mmdProperty
and configure the displayName
property.
{
"displayName": "CISO PPA approved by"
}
Enable the Relationships tab
By default, the relationships tab is not available for custom entities.
To enable the relationships tab, assign the relationships:enabled
trait to your entity.
For information about the relationships tab, see getting-started-with-one-data-datalog.adoc, Relationships And Lineage section.
Color code terms
When you create a new term type, you can use the fe:term
trait to give it a distinct color.
To define the color for a term, assign the fe:term
trait and add a color
property in the following format:
{
"color": "#FAA0A0"
}
For example, a term type without the After you assign the |
Traits reference
See the following tables for a list of property and entity traits available in ONE.
Property traits
Trait name | Trait properties | Description | ||
---|---|---|---|---|
fe:mmdProperty |
|
Assign this trait to change the display name of a property. |
||
fe:createByDefault |
If you add this trait to a parent entity, a single embedded entity (SEE) is automatically created when the parent entity is created. Adding this trait to a single embedded entity is required if you want to include scalar default values for it. |
|||
valueList:property |
This trait changes the way arrays of properties are displayed in the application. With this trait, they are displayed as properties instead of list of entities (for example, terms).
|
|||
core:classification |
|
If this trait is used, the policy is enforced on the target entity. This means that whenever requested entities are marked as classified the policy enforcement is involved. Otherwise, policies are not enforced.
|
||
core:dataMasking |
If some policy is evaluated as true for the requested data (policy is applied) then the data which is requested is being masked.
|
|||
core:propertyPublicApiCapability |
|
This trait configures capabilities in the API (GraphQL). For example, if the property can be accessed directly (without the parent), it is possible to publish or update it using the API.
|
||
core:cascade |
|
When a user wants to delete an entity that has references, different deleting strategies can be used:
|
||
core:uncopyable |
If you assign this trait to a property, the configuration of the property does not get copied when you duplicate an entity with this property. |
|||
core:reference |
|
This trait is used to determine the strategy used by the front end when setting the History Change Number (HCN) to referenced entities.
You can either always reference the latest version of entity (by omitting the trait or with You also need to specify
|
Entity traits
Trait name | Trait properties | Description | ||
---|---|---|---|---|
core:hasNoWorkflow |
If this trait is applied, the changes can be published without the approval process. |
|||
fe:mmdEntity |
|
In the properties of this trait, you can specify which forms are used for button names in singular and plural form as well as set the icon name. The following rules apply:
|
||
audit:auditEnabled |
If audit is enabled, the entity is audited if this trait is assigned. |
|||
fe:term |
|
Assign this trait to define the color of a term type in the trait’s properties. Applies only to term subtypes. |
||
core:displayName |
|
This trait allows to choose the primary property to be displayed in limited situations (lists, labels).
If not provided, properties |
||
core:nodePublicApiCapability |
|
This trait configures capabilities in the API (GraphQL). For example, if an entity can be accessed directly (without the parent), it is possible to publish or update it using the API. Internally, it is combined with
|
||
core:boundary |
Defines the boundaries of a subtree, that is, one united entity, which then looks like one entity for some kinds of operations (for example, history calculation or approval request generation). Rule entity example
|
|||
core:copyable |
This trait configures the capability of entities to duplicate the content of properties (the button Duplicate is available). For example, if the trait is set to |
|||
relationships:relationshipNode |
|
This trait enables the relationships visualization configuration for the chains of three entities. For example, in a relationship chain A < B > C, entity B is referencing entities A and C. If you want to display a direct relationship between A and C, the current trait should be present and configured on entity B, where source is A and target is C. This works if the entity B is present in the list of Relationship nodes in graph visualization configuration. For more information about how to add the entity to the list of Relationship nodes in graph visualization, see visualizing-relationships-on-the-graph.adoc. |
||
relationships:enabled |
This trait enables entity visualization on the relationship graph.
|
|||
relationships:skipped |
|
This trait hides the entity from the relationships chain in the Relationships graph.
One node can have multiple skip configurations, depending on the relationship chains it appears in. In this case, the "configuration" array will have multiple elements. |
Assign traits
After a property or an entity is added, click its name to see the details.
-
Go to Organization > Metadata Model.
-
Find and select the entity that you want to edit.
-
In Traits, select Add mmd trait and set the Trait name and properties as needed. You can find the necessary information earlier in this article (see Property traits and Entity traits).
-
Select Save.
-
Go to Upgrade Center and publish the changes. This includes switching to the maintenance mode, creating a database backup, and resolving any potential conflicts.
For more information and step-by-step instructions, see Upgrade Center, section Run and publish changes.
Edit and remove traits
To edit or remove an existing trait:
-
In the three dots menu, select Edit or Delete as required.
-
(Optional) If you are editing a trait, specify the changes in Trait properties and then select Save.
Some traits in the default configuration cannot be deleted. -
Go to System Changes and publish the changes. This includes switching to the maintenance mode, creating a database backup, and resolving any potential conflicts.
For more information and step-by-step instructions, see Upgrade Center, section Run and publish changes.
Was this page useful?