What is scriptrunner.cfg?

In the following example, the report Process manual runs with Script Runner for a process model of the United Motor Group demo database.

To do this, the entries in bold in the file ARIS client installation directory/tools/scriptrunner/scriptrunner.cfg.template have been adapted and saved in the Client installation directory as scriptrunner.cfg.

Information on parameter entry is shown if you click a link.

Once you have adapted the sample file scriptrunner.cfg and saved it in the same directory as scriptrunner.bat and scriptrunner.sh, start scriptrunner according to your operating system. Open the command prompt in ARIS client installation directory/tools/scriptrunner and enter the following for a Microsoft® Windows® operating system:

scriptrunner.bat scriptrunner.cfg

or for Linux® operating systems:

scriptrunner.sh scriptrunner.cfg

When this action is complete, the output file is available in the directory D:/Evaluations/Reports/example.pdf.

Sample file 'scriptrunner.cfg'

# client home directory (to be changed if required)

client.home=.

Client installation directory.

You can keep the default setting (.) only if you start the file scriptrunner.bat from the ARIS client installation directory/tools/scriptrunner.

# server to connect to

scriptrunner.servername=aris3.eur.ad.abc

Name of the ARIS server on which the script is run and the modeling data to be evaluated is saved.

Enter the fully qualified name or the IP address.

# port the server is listening

scriptrunner.serverport=80

Port number for the connection to the ARIS server.

The default port is 80. If your system administrator has assigned a different port number you need to enter it here.

# to use ssl set to true

scriptrunner.serverssl=false

Enables SSL (Secure Socket Layer) encryption for the data to be encrypted for transmission between ARIS server and ARIS client.

By default, this option is disabled. To use SSL enter the value true.

# tenant to use

scriptrunner.tenant=default

Valid tenant that provides a user with a particular functionality and specific data depending on their license.

In this example, the tenant is called default.

# User name for login. Use the login of the user who runs the report.

scriptrunner.username=system

User name and password of the user that is to be used for login.

In this example, login is performed with the system user system.

Enter the relevant user name. This user needs sufficient license, function, and access privileges.

# Password for login. Use the password of the user who runs the report. Can/Should be encrypted.

scriptrunner.userpassword={crypted}d12173f23e5f6e5d3cf163169b1068a4

Password of the user that is to be used for login.

In this example, login is performed with the system user system and the password manager (here: {crypted}d12173f23e5f6e5d3cf163169b1068a4).

Enter the password of the user that the report is to be run with. For security reasons, it is recommended that you encrypt the password using the ARIS Server Administrator command encrypt.

# Name of the database to which to log in.

scriptrunner.dbname=United Motor Group

Name of the database for which you want to run the report, or for whose elements you want to run the report.

In this case, the database name is United Motor Group. If you do not have access to this database your system administrator can help you. The demo database is available in the ARIS installation package.

# GUID of the method filter for login. No entry (default) is "entire method".

scriptrunner.methodfilterguid=dd838074-ac29-11d4-85b8-00005a4053ff

GUID of the method filter. In this example, the GUID is dd838074-ac29-11d4-85b8-00005a4053ff. If you do not specify a GUID here, the Entire method filter is applied automatically.

You obtain the GUID of a filter on the Administration tab by right-clicking the relevant filter and selecting Edit.

# Locale for database login. ISO 639 code for language.

scriptrunner.dblocale=en

ISO 639-1 code for the database language to be used for the report.

In this example, en for English is selected.

You can also specify the country in which the language is spoken by entering scriptrunner.dblocale.country=.

# Locale for database login. ISO 3166 code for country (optional).

#scriptrunner.dblocale.country=EN

ISO-3166 code for the country in which the language is spoken (optional).

In this example, EN for United States is selected.

# oem identifier (do not change)

#scriptrunner.oemprofile=oem01

Internal name.

To avoid failures do not change this entry.

# Locale for script string table and error messages. ISO 639 code for language.

scriptrunner.guilocale=en

ISO 639-1 code for the interface language in which error messages and report texts are displayed. It determines the language tab for the string table in Script Editor.

In this example, en for English is selected.

# Locale for script string table and error messages. ISO -3166 code for language. (optional)

scriptrunner.guilocale.country=EN

ISO-3166 code for the country in which the language is spoken (optional).

In this example, EN for United States is selected.

# Script component - id. Default is 'Report' (value = 1). Optional 'static publisher' (value = 10).

# scriptrunner.component=1

# GUID of script to run.

scriptrunner.scriptid=f1253ea0-1c0f-11dd-3a64-0015582c76ab

GUID of the report script to be run.

In this example for the sample script Process manual (f1253ea0-1c0f-11dd-3a64-0015582c76ab).

You obtain the GUID of a script on the Administration tab by right-clicking the script and selecting Properties.

Please use only reports whose Opens dialogs check box is disabled on the General properties page.

# Output format ID, defaults to -1 (no output)

# 0 = RTF

# 2 = Text

# 3 = HTML

# 4 = MS Word

# 5 = MS Excel

# 7 = other

# 8 = XML

# 9 = PDF

# -1 = No output

scriptrunner.outputformat=9

Defines the format of the output file.

In this example, the output format PDF (9) is used.

# Path and name for output file. Only relevant if output format != -1

scriptrunner.outputfile=D:/Evaluations/Reports/example.pdf

Path and name of the output file.

In this example, the entry D:/Evaluations/Reports/example.pdf is used. If the path does not exist it is created without prompting. Ensure that you have access privileges for the target path.

# GUID of evaluation filter (optional)

scriptrunner.evaluationfilterguid=

GUID of the evaluation filter you use to exclude items from evaluation. In this example, no evaluation filter is defined.

You obtain the GUID of a filter on the Administration tab by right-clicking the relevant filter and selecting Edit.

# IDs of objects from which to start the script. Separated by ';'

# DB : the script is to be run from a database context (database is specified by srciptrunner.dbname property)

# F:[GUID]: for scripts running from "configuration filter" context a configuration filter is specified by "F:" directly followed by the filter GUID

# G:[OID]: for scripts running from group objects: their OIDs, each preceded by "G:"

# M:[GUID]or[OID]: for scripts running from models: their OID or their GUID, each preceded by "M:"

# O:[GUID]or[OID]: for scripts running from object definitions: their OID or their GUID, each preceded by "O:"

# examples:

# scriptrunner.scriptinput=DB

# scriptrunner.scriptinput=F:f98555a9-6158-11d4-8582-00005a4053ff

# scriptrunner.scriptinput=G:

# scriptrunner.scriptinput=M:abababab-cdcd-efef-a1a2-b1b33fce23e5;M:ef2579bd-cdcd-efef-a1a2-b1b33fce23e5

# scriptrunner.scriptinput=O:abababab-cdcd-efef-a1a2-b1b33fce23e5;O:ef2579bd-cdcd-efef-a1a2-b1b33fce23e5

scriptrunner.scriptinput=M:bf2a9d60-7cb8-11dc-2729-000bcd0cce4e

Defines the database item for which the report is to be run.

Syntax: <element type>:<GUID>

To evaluate multiple identical database items separate the entries with a semicolon (;). Examples are available in the file as comments.

In this example, the process model of the database is evaluated, M:c45e1bd1-eff6-11e0-1cef-0025b3bf9d9d. M: stands for Model, followed by the GUID of the model.

The GUID is available on the Properties page Information of the model.

# User-defined properties. Can be accessed in script using Context.getProperty("propertyname")

scriptrunner.userproperty.count=0

Configuration for calling texts that you can define in the lines scriptrunner.userproperty<number>.key= and scriptrunner.userproperty<number>.value=.

Change the entry 0 only if you use the call Context.getProperty("<value of the key>") in your own report scripts.

For example, if you specified the following texts and keys:

scriptrunner.userproperty.count=2

scriptrunner.userproperty1.key=send_mail

scriptrunner.userproperty1.value=true

scriptrunner.userproperty2.key=Extra text

scriptrunner.userproperty2.value=Started with scriptrunner.bat

you can call these texts in the script as follows:

var text = Context.getProperty("Extra text") //returns "Started with scriptrunner.bat"

if("true"==Context.getProperty("send_mail")

sendMail();

# as many user-defined properties as specified in scriptrunner.userproperty.count.

# syntax:

#scriptrunner.userproperty1.key=

#scriptrunner.userproperty1.value=

#scriptrunner.userproperty2.key=

#scriptrunner.userproperty2.value=

#...