Skip to main content

Version: 24.10

svc-scaffold-legacy

note

Creating new Legacy Groovy services is not recommended as they have a weaker security model.

Use of internal TM Java API's is discouraged as they are not designed for Groovy service usage and are subject to change.

The svc-scaffold-legacy task provides a scaffolding task to create a new Legacy Groovy service.

When you run this task, you specify a service name, a service type and a source directory. The task creates a service-def.json file for you, and creates a Groovy Service source file and unit test source file using the Journey Manager Groovy service templates.

Task Attributes

All attributes are optional unless otherwise indicated.

AttributeDescription
templateString

Required. A supported service definition template. For example, "Dynamic Data".

nameString

Required. The service name. For example, "TrackMe DD".

packageNameString

Required. The package name for the generated Grooy service definition. For example, "com.maguire.svc.trackme".

versionString

Required. The service version number. For example, "2".

clientCodeString

Required. The service organization client code. For example, "maguire".

dirString

Required. The target project directory to create and deploy files to. For example, "src/trackme-dd".

Example

The example ant task below creates a new groovy service using the svc-scaffold task. This example prompts the user to specify the required parameters.

<target name="svc-scaffold">
<input message="Enter the Service Name:" addproperty="name"/>
<input message="Enter the Package Name:" addproperty="packageName"/>
<input message="Enter the Service Template:"
validargs="Groovy Delivery Process,Groovy Dynamic Data,Groovy Email Service,Groovy Form Prefill,Groovy Form Saved Processor,..."
addproperty="template"/>
<svc-scaffold
template="${template}"
name="${name}"
packageName="${packageName}"
version="${version}"
dir="${basedir}/src"/>
</target>