Teneo Developers
Table of Contents
Was this page helpful?

Share to

Script node

Overview

A script node allows to add programmatic functionalities to a Flow, the code in a script node has access to all Global Variables and to all Flow Variables of the current Flow.
The scripting language used in Teneo Studio is Groovy and Teneo Studio offers basic support for syntax highlighting, including support for different identifiers (type name, literals, keywords, etc.).

Add Script

With the Flow open, add a Script node by following the below steps:

  • Click the Plus icon, and depending on the icon's location in the Flow graph and the desired behavior, select one of the following options:
    • Continue With > a Script to execute an action
    • Split Path > to a Script to execute an action
  • Alternatively, select the node in the Flow editor after which the new node should be added and click the Script button in the Add Node section of the top ribbon
  • The Script panel opens in the right side of the Flow window, optionally add a Name and a Description
  • Write the Execution Script
    • Open With... allows to edit in an external script editor, when done, simply save save and close the external script editor to return to Teneo Studio
  • Optionally, Add metadata definitions to the Script node
  • Remember to Save the Flow to preserve the changes.

Edit Script

With the Flow open, follow the below steps to edit the Script:

  • In the Flow editor, select the Script node to open the Script panel in the right side of the Flow window
  • Click Add name to give the Script node a name
  • Optionally, Add description
  • Under Execution Script perform any needed editions to the execution script
  • Optionally, Add metadata definitions to the Script node
  • Remember to Save the Flow to preserve the changes.

Delete Script

In the open Flow, follow the below steps to delete a Script node:

  • Select the Script node in the Flow editor
  • In the top ribbon, click Delete
  • Remember to Save the Flow to preserve the changes.