Skip to main content

Version: 18.05 (EOL)

Transact Services Overview

Transact Services and functions are contained in individual project folders and include 4 key files:

  • service-def.json: the Groovy Service definition
  • service-help.html: the Help Doc file for display in the Transact Manager Service Definitions Help tab
  • Service.groovy: the Service groovy script source file
  • ServiceTest.groovy: the Unit Test groovy script

A simple example project service structure is shown below.

project
  • src
    • com
      • maguire
        • helloworld
          • service-def.json
          • service-help.html
          • HelloWorld.groovy
          • HelloWorldTest.groovy

The service-def.json file refers to other resources in the project.

Service Definition

The Groovy Service Definition is provided in a service-def.json file. A simple example is shown below.

service-def.json
{
"name": "Hello World",
"type": "Fluent Groovy Service",
"version": 1,
"tmMinVersion": "5.0.0",
"legacyGroovy": false,
"parameters": [
{
"name": "groovyScript",
"filePath": "HelloWorld.groovy"
},
{
"name": "Unit Test Script",
"filePath": "HelloWorldTest.groovy",
"unitTest": true
}
]
}

The service definition file specifies the bare minimum configuration necessary to create a valid service archive. Any missing configuration attributes and parameters are provided by the svcpackage task when you create a service archive. The service definition's type attribute is used to resolve the missing attributes and parameters from the standard service and function templates.

In your service definition file you can override default service template attributes and parameters.

A larger example is shown in the Fluent Dynamic Data service example below. This example includes a clientCode attribute for the Organization that owns the service.

The serviceConnection attribute is used to resolve a TM Service Connection entity at runtime. Service Connections are used to store common remote connection details used by multiple services. If the named service connection does not exist on the TM server a new one will be created with the given name and of type "HTTP Endpoint".

{
"name": "TrackMe DD",
"description": "Identity Verification Dynamic Data Service",
"type": "Fluent Dynamic Data",
"version": 1,
"tmMinVersion": "5.0.0",
"legacyGroovy": false,
"serviceConnection": "TrackMe Connection",
"clientCode": "Maguire",
"parameters": [
{
"name": "TrackMe Account Key",
"description": "TrackMe Account Key",
"value": "ABC-123",
"type": "String",
"bind": false
},
{
"name": "groovyScript",
"filePath": "TrackMeDD.groovy",
"fileIncludes": [
"../common/trackme-utils.groovy",
"../common/data-utils.groovy"
],
"readOnly": true
},
{
"name": "Unit Test Script",
"filePath": "TrackMeDDTest.groovy",
"readOnly": true,
"unitTest": true
}
]
}

Service Attributes

You can add arbitrary service attributes to your service definition. Attributes are optional unless otherwise indicated.

AttributeDescription
nameString

Required. Service definition name.

descriptionString

Service definition description.

typeString

Required. Service type.

versionNumber

Required. Service version number.

tmMinVersionString (Maximum length 20 characters)

The minimum TM version required for the service. Formatted as a valid version string - see Version Attributes.

legacyGroovyBoolean

Whether the service uses legacy mode unsecure Groovy API.

serviceConnectionString

The name of the service connection.

clientCodeString

The client code, note this should generally be specified in svcupload Task.

parameters[]Object

See Service Parameters below.

Service Parameters

You can add arbitrary service parameters to your service definition. When you do so you need to specify the parameter attributes. Attributes are optional unless otherwise indicated.

AttributeDescription
nameString

Service parameter name.

descriptionString

Service parameter description.

typeString

Service parameter type.

Valid values are "String", "Boolean", "Number", "HTML", "JSON", and "Password".

valueVariable type - dependent on type.

Service parameter value.

filePathString

Service parameter value loaded from the specified path.

fileIncludes[]String

A list of groovy script source files to prepend to the Groovy service script file when packaging.

bindBoolean

Specifies whether to inject the service parameter into the Java service object.

readOnlyBoolean

Specifies whether the service parameter is read only on the server and cannot be edited in Transact Manager.

requiredBoolean

Specifies the service parameter is required to create the Java service object.

clearOnExportString

Specifies the service parameter value will be cleared when exported from a TM system.

unitTestString

Specifies the service parameter is for unit testing only.

As a minimum, you need to specify the parameter attributes name, type, value and bind. Always set the bind attribute to false if you are creating an arbitrary service parameter.

Service Scaffolding Templates

Services are best created using the svc-scaffold Ant task.

Transact Function templates

Fluent Service templates

  • 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 Render Receipt
  • Fluent Receipt Number
  • Fluent Scheduled Service
  • Fluent Submission Preprocessor
  • Fluent Submission Completed Processor
  • Fluent Submission Data Validator
  • Fluent Task Expiry
  • Fluent Tracking Number
  • Fluent Transaction History Publisher
  • Fluent Virus Scan

Collaboration Job templates

  • Job Controller - Customer Onboarding
  • Job Controller - 1 Step Review
  • Job Controller - 2 Step Review

Legacy Groovy Service templates

  • Groovy Delivery Process
  • Groovy Dynamic Data
  • Groovy Email Service
  • Groovy Form Prefill
  • Groovy Form Saved Processor
  • Groovy Form Security Filter
  • Groovy Form Version Selector
  • Groovy Service
  • Groovy Job Action
  • Groovy Render Receipt
  • Groovy Receipt Number
  • Groovy Scheduled Service
  • Groovy Submission Preprocessor
  • Groovy Submission Completed Processor
  • Groovy Submission Data Validator
  • Groovy Task Expiry
  • Groovy Tracking Number