Skip to content

application.properties

This properties file hold a number of settings for the application and can be configured as you need. All changes require a restart (stop and and start the tomcat service) of the application.

More, in depth, information can be found in the Spring official documentation.

Below you can find the standard options we deliver with EPR and what they do.

logging

config

Path to the configuration file used to where logs are written, for how long they are saved and how the output is formatted. By default EPR looks for a file called logback-spring in ${spring.config.location}, which is the config directory in the directory where you installed EPR (Ex. D:\Easit\EPR-Test\config).

1
  logging.config=${spring.config.location}logback-spring.xml

Read more about Logging

PowerShell

location

Path to the executable for PowerShell 7. This is used to start a powershell process a script file and body from the request as input.

1
  powershell.location=C:/Program Files/PowerShell/7/pwsh.exe

This is the the equivalent to:

1
  C:\Program Files\PowerShell\7\pwsh.exe -File [scriptfile.ps1] [requestbody]

script.location

Path to where the script / scripts are located that you would like to be able to run with EPR. All scripts executed by EPR directly must be located in this directory, no recursion is used to find script files.

1
  powershell.script.location=D:/Easit/EPR-Test/scripts/

runtimeout

When EPR starts a new process for PowerShell to run a script, a default timeout of 600000 is used. This means that if the script takes longer than 5 minutes to run, EPR will stop the running script and end the process running it and then log it to EasitProcessRunner.log.

1
  powershell.runtimeout=1200000

allow.serviceaccount

Since EPR runs in a Tomcat service, any script or process started by EPR will run as the user the Tomcat service is running as. We therefore recommend you to use a domain account for running the Tomcat service and thus have a better control over what resources can be used and what actions can be taken in a script.

By default, EPR do not allow you run the Tomcat service with a local service account. If you would like to override this, add the line below to your application.properties.

1
  warning.allow.serviceaccount=true

context-path

By default Camel adds /camel/ to contextpath. With this property this is removed and lets you connect to the service with http://[servername]:[port]/api/script.

1
  camel.servlet.mapping.context-path=/api/*

Send error with mail

These settings are used for send an email when an error occurs for EPR. For example if you would like an email sent when EPR cannot find a script file, this is configured here.

Change mail.sendMail to true and provide correct details.

  • server: URL to the smtp-server that should send the email.
  • from: Email address used as FROM when sending the email.
  • to: Email address that the email should be sent to.
  • subject: Subject for the email sent.
1
2
3
4
5
  mail.sendMail=true
  mail.server=smtp.company.com
  mail.from=integration@easit.se
  mail.to=it@company.com
  mail.subject=Easit Process Runner - An error has occurred

Send error with webservice

If, instead of or in addition to sending an email when an error occurs, you like to send the error to a webservice you can configure this with the following settings. The request body will follow the WSDL for Easit GO, found at [URLtoEasitGO]/webservice/bps.wsdl.

  • err.sendImport: Set to true if you would like to send web request upon errors
  • easit.go.url: URL to the webservice that should receive the web request.
  • easit.go.apikey: API-key used for basic authentication.
  • err.importhandleridentifier: Value to be used for the property 'importhandleridentifier' in the web request body.
1
2
3
4
  err.sendImport=true
  easit.go.url=http://localhost:8080
  easit.go.apikey=1234
  err.importhandleridentifier=scriptError