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.
Creating a script service
To create a script service, follow the steps below:
- Launch the script service wizard by right-clicking on the target package's
codedirectory (or any of the code directories underneath it) where you'd like to store the script service, and then select New > Script Service.
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
Launch the wizard using keyboard shortcuts only
In Martini, you can open the script service wizard by pressing (or in Martini Online) and
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.
Here's a breakdown of its primary components:
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.
Script text area