Teneo Developers

Global Listeners

Introduction

There are several types of Listeners available in Teneo Studio and depending on where in the solution it is needed to listen for user input these can be defined.

A Global Listener listens for user input anywhere in the solution and is tested on every user input.

There are two types of Global Listeners:

  • Global Pre Listeners which are tested before the input is tested against Triggers/Transitions
  • Global Post Listeners which are tested after the input has been tested against Triggers/Transitions.

Create a Global Listener

In the main window of Teneo Studio, click the Solutions tab to go to the backstage of Teneo Studio; select Globals and next Listeners in the top panel.

  • Click Add, in the drop-down menu select Pre-listener or Post-listener
  • The new Listener window opens:
    • Write a Name and optionally a Description
    • Click the back-arrow in the top left corner when done
  • In the Condition field, add the condition that should be matched in the user input using Teneo Linguistic Modelling Language
  • In the Execution Script field, specify what the Listener should do when the condition is met.

If required, the following properties can be defined below the Execution Script field:

  • Test sentences from: select between Last to first (Default)/First to Last
  • Limit unused words to: tick this option to set the number of unused words allowed
  • Stop after: select between First match and All sentences tested

Edit Global Listener

To edit a Global Listener, simply select the Listener in the list in the backstage (Solution tab > Globals > Listeners) and click Edit in top of the panel in the far right side of the window.

Delete Global Listener

To delete a Global Listener, simply select the Listener(s) to be deleted in the list in the backstage of Teneo Studio (Solution tab > Globals > Listeners) and click Delete in the top of the list.

Teneo Studio will prompt the user to confirm deletion of the selected Listener(s); click Yes to continue.

If a Global Listener was deleted by mistake, it can be restored from the Recycle Bin; read more here.

Include and Exclude

The Include and Exclude buttons available in the top of the list of Global Listeners refers to inclusion or exclusion from Local solutions when working in a Localization setup; read more here.

View History

The user can access the history of a Global Listener in two ways:

  • Either select the Clock button available in the top of a selected Global Listener, or
  • while editing the Listener, in the Listener window go to the backstage of the Listener (Listener tab) and click History.

Read more about Version history here.

Restore version

It is possible to restore a former version of a Global Listener in the History view. To do so, first open either of the views of the history.

By clicking the version number, it is possible to open and review the former version of the Listener in read-only mode. To restore, click Restore in the top ribbon of the Listener.

Version Flags

The button Set Stable, available above a selected Global Listener, allows to set the current version of the Global Listener as stable when pressed; when a Global Listener is opened in Edit mode, it is also possible to click Set Stable in the top ribbon of the window.

To set a previous version of a Global Listener as stable, either open the History and in the History view, select the version of the Global Listener which should be stable and click Set Stable in the top right area; or open the Global Listener in Edit mode and go to the backstage by clicking Listener in the top left corner, select History and in the list of versions, select the wanted version and click Set Stable in the top right area of the view.

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

Learn more about Version Flags.

Global Listener Ordering

Listener Ordering

The Listener Ordering is available at the bottom of the list of Global Listeners; click Edit to change the order of any of the Listeners in the list.

By selecting a Global Listener and using the blue up/down arrows available in the right side of the list, the ordering of the Global Listeners can be changed.

Listener Ordering

When done remember to click Save ordering to preserve the changes.

Stable version of Listener Ordering

It is mandatory to set a version of the Listener Ordering as stable in order to be able to test and/or publish a stable version of the solution; this is done by clicking Set Stable in the Listener Ordering (below the list of Global Listeners).

It is possible to set a previous version as stable by opening the History (clock icon) and in the Global Listener Ordering - History view select the version and click Set Stable.

Types of Listeners
Pre and Post matching Listeners
Teneo Linguistic Modelling Language
Writing Execution Scripts
Test sentences from
Limit unused words to