Skip to main content

xSuite Interface Windows Prism 5.x – Online Help

Sample Configuration: Global Configuration

Of the sample configurations, there are two primary global configuration files:

  1. example_globalConfig_webService.json: configuration file for web services

  2. example_globalConfig_webService.json: configuration file for scenario-processing workers

The include file example_globalConfig_common.json is also available. To avoid redundant configuration entries, this file contains all settings that are shared by the other two files. In particular, this applies to settings for the database connection and logging and to global constants. In the other two files, the General.IncludeConfig property defines that the contents of the include file be automatically added to the other content at runtime.

Logging

Shared logging takes place simultaneously in all supported output channels, i.e. in the console (. ToConsole), the internal administration database (.Database.Type), and the file system (.File).

When logging to the file system, subfolders with the current date are created dynamically. The log files themselves are separated by name according to tenants and categories, so that each web service instance and each worker instance describes its own log file without creating overlapping entries. Warnings and errors are also output in the Windows event display (.ToEventLog) and as an email notification (.Mail). An SMTP server is used here as an example for the email notification. The logging level (.Level) is set to the value "Debug," which is useful for regular operation. The "Trace" value should only be used for analysis purposes.

Database

As a Microsoft SQL Server is the server most often used in practice, it has been chosen as the administration database in this example. However, in order to achieve greater speed, we recommend using a MongoDB database wherever possible. When using a relational database system, deactivate logging to the database if possible. This will minimize load on the database system, especially if your log levels are high.

Web Services

The program instance that is responsible for executing the web services requires a certificate for encrypting passwords and a server certificate for SSL/TLS encryption (Certificate[].Usage). The certificate for the encryption of passwords is loaded from a password-protected file in the sample configuration. The server certificate is searched for using the location and name in the Windows certificate store.

The asterisk placeholder for the host name in the web address(WebService.Url[]) ensures that the web services can be addressed via all valid names, i.e. via the server name and locally via localhost. The URL base path (. UrlBasePath) is assigned the default value here, but can also be explicitly removed by specifying / so that the path does not have to be specified as a fixed address component for every web service call.

As the simplest variant of access protection, basic authentication is configured for the web services (.AuthMode), ensuring that a user must log in to the browser with one of the stored user/password combinations (. BasicAuthUser[] ).

For the intended use case, both the Status Web Service and the Config Web Service are activated (StatusService.Activate and ConfigService.Activate). Communication via UDP is configured on both sides (StatusService.LiveInfo) so that the program instance running separately for scenario processing can regularly transmit live information on the status of the worker instances. The address where incoming data is to be listened for (.UdpAddress) is specified here on the receiver side. This functionality must also be activated on both sides (.ViewWorkers).

Workers

The UDP address for the live information is defined from the perspective of the sender (in the configuration of the instance responsible for executing the scenario). While an asterisk placeholder for the host name is also permitted for the recipient in the same way for as the web service address, the specific name of the target host is required on the sender side. In addition, the base address of the Status Web Service of the other side is specified (.StatusServiceUrl) because this additional path is used to transmit information for encrypting the UDP data at application level.

The assignments of the scenario to the worker instances are defined in the global configuration of the instance (Worker[]). In addition, the instance also takes on the task of time-controlled execution of general scheduler tasks (Schedule.Task[]) to clean up old data when it reaches a certain age. Specifically, these are 2 macro-based tasks for deleting batch/document entries and log entries from the database (DeleteBatches() and DeleteDbLogEntries()) as well as a task for deleting date-related log subfolders from the file system(DeleteFolders()). Analogous to this, another task can also be set up to delete old backup data from scenario processing.