Script

This source is provided to give you the flexibility of building your own source without the need to compile from source. The source uses JSR-223 Scripting Engine. The script language can be changed by setting the property source.lang in your requisition.properties file. By default groovy 2.3.3 and beanshell 2.0b5 are ready to use. If you want to use other supported languages, you might need to provide the language jar in the lib folder of PRIS.

Parameter Required Description

source

*

set script to use JSR-223 Script Engine as source

source.file

*

path to script source relative to requisition.properties

source.lang

JSR-223 Script language by name, by default the file extension is used to detect the language.

source.<name>

you can have access to a parameter name in your Groovy script if you name it with the prefix source.

You can find a working Groovy source in the examples/source/scriptExample directory. A custom parameter name count is passed into the Groovy script.

Example configuration to generate a requisition from a Groovy script
### File: myGroovySource/requisition.properties
# This example creates a requisition node from a Groovy script
source = script
source.file = myGroovySource.groovy
source.count = 3

### default no-operation mapper
mapper = echo