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 Transact Groovy service templates.
Task Attributes
All attributes are optional unless otherwise indicated.
Attribute | Description |
---|---|
template | String Required. A supported service definition template. For example, |
name | String Required. The service name. For example, |
packageName | String Required. The package name for the generated Grooy service definition. For example, |
version | String Required. The service version number. For example, |
clientCode | String Required. The service organization client code. For example, |
dir | String Required. The target project directory to create and deploy files to. For example, |
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>