Journey Manager (JM) The transaction engine for the platform. | Form Builder Platform Developer | 17.10 This feature was introduced in 17.10. | 23.04This feature was updated in 23.04
Manager comes with the GroovyGroovy is a powerful scripting language which runs on the Java Virtual Machine. Across theTemenos Journey Manager platform, Groovy is used to create services in Manager. These services are primarily used to create plug-in style systems that interact with Manager. console enabling developers to rapidly develop and test Groovy scripts. Groovy console has access to all services and libraries, which allows you to simulate the behaviors of any Groovy service.
You must have the Groovy Console permission set to your user account to run Groovy scripts in the Groovy console.
To run a script in the Groovy console:
At installation time, the system wide build property groovy.secure.api
defines whether the Secure Fluent API Only service parameter is editable or available.
The events are created only when both the Commit DB Changes and the Generate Event checkboxes are selected and the changes, applied to the Manager's entities, satisfy criteria defined in the Event Configuration Storage Definition.
The Generate Event checkbox is not shown if the eventing feature is disabled in deployment properties.
[Static type checking] - Cannot find matching method Script1#printl(groovy.lang.GString).
Please check if the declared type is correct and if the method exists.
@ line 2, column 1.
printl "Hello world, $it"
^
1 error
Now, you can use companyName
parameter in the Groovy script, for example:
def name = serviceParameters.companyName
(0..9).each {
println "Hello $name, $it"
}
You can use more complex Groovy code snippets including imports, as shown below:
import com.avoka.tm.query.*
import com.avoka.tm.vo.*
String trackingCode = "LHC5DD"
String txnPropertyName = "Monty"
Txn txn = new TxnQuery()
.setTrackingCode(trackingCode)
.firstValue()
// PropertyQuery() to access the Monty property value
String txnPropertyValue = new PropertyQuery()
.setName(txnPropertyName)
.setTxn(txn)
.getValue()
// expected result: txnPropertyValue = Python
println "txnPropertyValue = ${txnPropertyValue}"
A script saved in the Groovy console is specific to each user, so when you open the console next time, you will see your recently accessed script in there.
Next, learn about Groovy service log.