Skip to content

Toro Cloud Dev Center

Script services

A script service is a special type of service that executes a script in a given supported language. It's a hybrid between a regular service, and a script step. Script services are useful when you have scripts that need to be reused across multiple services.

Script services include the same input and output functionality, but instead of running regular steps, it runs your script, similar to a Gloop SQL service.

Creating a script service

To create a script service, follow the steps below:

Creating a Script service

Creating a Script service

  1. Launch the script service wizard by right-clicking on the target package's code directory (or any of the code directories underneath it) where you'd like to store the script service, and then select New > Script Service.
  2. In the wizard, specify the following details:

    • Location - where the script service will reside; its default value will be the folder where you started the wizard from
    • Name - the name of the script service
    • Language - the language in which the script service will be written in
  3. Click Finish.

Launch the wizard using keyboard shortcuts only

In Martini, you can open the script service wizard by pressing (or in Martini Online) and typing gss in the dialog's search box. After that, press and the wizard will appear.

Editing script services

After creating the script service, Martini will automatically open the service for you, and you will be shown the script service editor.

Script service editor

Script service editor

Here's a breakdown of its primary components:

  1. Language drop-down

    The name of the language of the script service. Languages here will appear based on the operating system that's running Martini, and what else has been installed.

  2. Script text area

    The script itself. While Groovy is the selected language in Martini Desktop, the editor will include all the features of the Groovy editor.