Skip to main content

Version: 18.05 (EOL)

Service JSON Definition

In Transact Manager, services are software modules configured to perform specific business-related functionality, usually by executing Groovy scripts, and often used to call external services hosted on premise or on cloud.

Example

An example Service definition file is shown below.

service-def.json
{
"name": "GetAccounts",
"description": "TODO...",
"type": "Fluent Function",
"version": "0.1.0",
"clientCode": "maguire",
"serviceConnection": "Accounts",
"tmMinVersion": "17.10.0",
"parameters": [
{
"name": "groovyScript",
"filePath": "GetAccounts.groovy",
"fileIncludes": [],
"bind": true,
"required": false,
"clearOnExport": false,
"readOnly": false
},
{
"name": "Unit Test Script",
"filePath": "GetAccountsTest.groovy",
"fileIncludes": [],
"bind": false,
"required": false,
"clearOnExport": false,
"readOnly": false,
"unitTest": true
},
{
"name": "Help Doc",
"type": "HTML",
"filePath": "service-help.html",
"bind": false,
"required": false,
"clearOnExport": false,
"readOnly": false
},
{
"name": "Test XML Data",
"type": "String",
"filePath": "test-data.xml",
"bind": false,
"required": false,
"clearOnExport": false,
"readOnly": false,
"unitTest": true
}
]
}

Schema

Service definitions must comply with the following schema.

Fields are optional unless otherwise indicated.

FieldDescription
namestring

Required. The Service's name.

descriptionstring

A brief description of the Service.

clientCodestring

Required.

legacyGroovyboolean

Required.

typestring

Required. The service type is dependent on the value of the legacyGroovy attribute.

If legacyGroovy is false, must be one of the following:

  • "Delivery Function"
  • "Fluent Function"
  • "Fluent Delivery Process"
  • "Fluent Delivery Process with Checkpoints"
  • "Fluent Dynamic Data"
  • "Fluent Email Service"
  • "Fluent Form Prefill"
  • "Fluent Form Saved Processor"
  • "Fluent Form Security Filter"
  • "Fluent Form Version Selector"
  • "Fluent Groovy Service"
  • "Fluent Groovy Service - REST Data Loader"
  • "Fluent Job Action"
  • "Fluent Receipt Number"
  • "Fluent Render Receipt"
  • "Fluent Scheduled Service"
  • "Fluent Submission Preprocessor"
  • "Fluent Submission Completed Processor"
  • "Fluent Submission Data Validator"
  • "Fluent Tracking Number"
  • "Fluent Task Expiry"
  • "Fluent Transaction History Publisher"
  • "Fluent Virus Scan"
  • "Job Controller"

If legacyGroovy is true, must be one of the following:

  • "Groovy Delivery Process"
  • "Groovy Delivery Process with Checkpoints"
  • "Groovy Dynamic Data"
  • "Groovy Email Service"
  • "Groovy Form Prefill"
  • "Groovy Form Saved Processor"
  • "Groovy Form Security Filter"
  • "Groovy Form Version Selector"
  • "Groovy Groovy Service"
  • "Groovy Groovy Service - REST Data Loader"
  • "Groovy Job Action"
  • "Groovy Receipt Number"
  • "Groovy Render Receipt"
  • "Groovy Scheduled Service"
  • "Groovy Submission Preprocessor"
  • "Groovy Submission Completed Processor"
  • "Groovy Submission Data Validator"
  • "Groovy Tracking Number"
  • "Groovy Task Expiry"
  • "Groovy Transaction History Publisher"
  • "Groovy Virus Scan"
versionstring

Required. The Service version number.

For information about version numbers, see Version Attributes.

tmMinVersionstring

The minimum version of Transact Manager required to run the Service.

For information about version numbers, see Version Attributes.

serviceConnectionstring

A service connection name.

parameters[]Object (Service Parameter)

Required. Zero or more Parameter objects.

Service Parameter

Fields are optional unless otherwise indicated.

FieldDescription
namestring

Required. The parameter's name

descriptionstring

A brief description of the parameter.

typestring

Required. Must be one of the following:

  • "Groovy Script"
  • "HTML"
  • "JSON"
  • "String"
bindboolean

Required. Inject the parameter value into the "creates service" object.

clearOnExportboolean

Required. Whether to clear the parameter's value when the Service definition is exported.

Set to true to ensure server-specific configurations are not used accidentally on other servers.

readOnlyboolean

Required. Whether the service parameter is editable.

requiredboolean

Required. Whether the value field is required.

unitTestboolean

Set to true to make a parameter available in the svcDef.testParams map when the service's Unit Test is invoked within the Unit Test scope.

To override a service parameter value with one configured as Unit Test service parameter, set the value manually in the Unit Test Class by adding it to the svcDef.paramsMap items before invoking the service under test. You can take the value from the svcDef.testParam map.

valuestring

The parameter's value. This (or filePath) is required if required is true.

filePathstring

A file path: replaces value if present.

fileIncludesstring[]

An array of filenames.

The contents of each file will be appended to the value or filePath attributes.