Teneo Developers

Metadata

Metadata definitions

Currently Metadata is only available inTeneo Studio Desktop

Metadata is defined in the backstage of Teneo Studio (Solution tab > Globals > Metadata) and once defined can be assigned to Flows, Flow nodes and Transitions; learn more in the Flow section about how to assign already defined Metadata to.

Create Metadata definition

Follow these steps to add a new Metadata definition:

  • Click the Solution tab, to go to the backstage of Teneo Studio
  • Select Globals and next click the Metadata tab in the top of the view
  • Click the Add button and select the scope of the Metadata definition: Session, Transaction or Flow
  • Give the Metadata a Name and optionally a Description
  • Select the Value Type:
    • Boolean
    • String
    • Tree
    • Number
    • Bundle
  • In the Auto-Logging Value field, add the default value
  • Remember to click Save to preserve the changes.

Metadata properties

Name and Description

The name given to the Metadata in the Name field is the name under which the Metadata will be logged in the log files.

The Description field is optional and allows the user to write a short description of how or where this Metadata definition is supposed to be used.

Enabled or Disabled

Newly created Metadata definitions are by default Enabled, but these can be disabled when and if needed to turn off logging for the particular Metadata definition.

Scope

The Scope of a Metadata definition establish if it can be assigned and when it can be automatically evaluated and logged.

There are three different scopes:

  • Session scoped Metadata cannot be assigned, this type of Metadata is evaluated and logged when a session ends.
  • Transaction scoped Metadata cannot be assigned, and this type of Metadata is evaluated and logged when a transaction ends.
  • Flow scoped Metadata can be assigned, and is evaluated and logged when a Flow is raised, dropped, suspended, resumed, or where the Metadata is assigned.

Value Type and Auto-Logging Value

The Value Type dropdown provides various options and depending on the selected Value Type, the Auto-Logging Value field provides different options to the user:

Value TypeAuto-Logging ValueNote
BooleanTrue/False buttonAlternatively, click the Groovy String button available in the left-side to enter a Groovy string
StringScript string field
TreeDot-separated stringAlternatively, click the Groovy String button available in the left-side to enter a Groovy string
NumberExplicit value, "0" being defaultAlternatively, click the Groovy String button available in the left-side to enter a Groovy string
BundleAllows creating Metadata Bundles, each Bundle has a name and a scope, and each sub-definition has a Name, Type and Value

The Auto-Logging Value field is a Groovy editor, which contains the default value to be evaluated when the Metadata is logged, but the value is not actually a script but rather the content of a Groovy string which can be interpolated with the ${} markup.

One or more scripts can be embedded in the string by using the${} markup.

Examples of embedded scripts in the Auto-Logging Value field:

  • ${ _.getThisFlow().getName() }
  • ${ _.getSessionId() }
  • ${ _.getTransactionId() }

Bundle

When selecting Value type > Bundle, the user is able to create a Metadata Bundle.

The user can add Sub-definitions (one or more) to the Metadata Bundle by clicking the Add button available.

Each Sub-definition allows to customize the following properties:

  • Name
  • Type (Boolean, String, Tree, Number)
  • Auto-Logging Value

Note that when logged, the name of each Metadata is the concatenation of the Bundle name and the Sub-definition name, e.g. BundleName_SubDefinitionName.

Auto-Logging

In Teneo Studio, both Session and Transaction scoped Metadata are automatically logged by Engine.

When working with Flow scoped Metadata a tick-box appears between the Value Type and Auto-Logging fields where it is possible to deselect the Auto-Logging option. When doing so, the Flow scoped Metadata will only be logged where assigned in the solution.

Delete Metadata definition

To delete one or more Metadata definitions, follow the below steps:

  • Select the Metadata definition to be deleted, multi-select by maintaining Ctrl pressed while clicking
  • Click the Delete button above the list of Metadata definitions
  • The Metadata definition(s) is marked for pending delete, to apply the deletion, either:
    • Select one Metadata definition and click Apply, repeat for each of the Metadata definitions to be deleted
    • Click Save in the right-side panel to apply all changes at once (note that other pending save actions will also be applied, for example adds, edits, or delete actions of other Global elements)
    • Click Save All to save all changes in the solution, including changes to Flows, Language Objects, Entities, etc.

To recover a deleted Metadata definition from the Recycle Bin, look here.

Search and Filter

The Filter text field available above the list of Metadata definitions allows the user to filter the available Metadata definitions by entering a word or part of a word in the field.

The Search button allows the user to find assignments of a specific Metadata definition. To search for the assignment, simply select the Metadata definition from the list and click Search. Teneo Studio will automatically take the user to the Search Results page.

History

The History of a Metadata definition is available by first selecting a Metadata in the list and next clicking the Clock icon available next to the Edit button.

Read more about Version history here.

Restore version

It is possible to restore a former version of a Metadata. To do so, in the History window, select the version to restore to and click Restore in the top right side of the window.

Version Flag

The button Set Stable, available above a select Metadata definition, allows to set the current version of the Metadata as stable when pressed.

To set a previous version of a Metadata as stable, first open the History; in the History view, select the version and click Set Stable in the right top area.

To unset a stable version, select the Metadata (version) and click Unset Stable.

Learn more about Version Flags.

Metadata in Localization setups