1. Home
  2. Configure FlexRule Server in Windows

Configure FlexRule Server in Windows

◷ Reading Time: 10 minutes

You can run the FlexRule Server Configurator wizard to configure the Master and Agent nodes and create default resources. The configurator needs to be run separately for each Master and Agent node you install.

Once the wizard is complete a configuration file is generated:

  1. FlexRule.Server.Master.dll.config for each Master node.
  2. FlexRule.Server.ExecAgent.dll.config for each Agent node.

You can also run the Configurator manually to change the configuration. The Configurator executable file is located in each of the Master and Agent folders and is called FlexRule.Server.Configurator.exe and needs to be run using ‘Run as Administrator’.

Configuring the Master and Execution Agent

The wizard at the beginning asks you to select to install and configure either the Master or Execution Agent.
They share many steps but there are some differences.

The following is the list of steps for Master and Execution Agent nodes:

  • General Settings
  1. Server IP Address and Port (Master and Execution Agent)
  2. Runtime License (Execution Agent)
  3. Workbench (Master)
  4. Debug and Tracing (Master and Execution Agent)
  5. Default Accounts (Master)
  • Security Settings
  1. Master Encryption Password (Master)
  2. Authentication signing Key (Master and Execution Agent)
  3. Master-Agent Shared Secret (Master and Execution Agent)

Steps for Master Configuration

Provide Runtime License location

This is the location of flexrule.license.lic file

Execution Agent nodes are responsible for executing rules and decisions. To execute them, they will use the FlexRule Runtime engine. You need to provide your license to the Execution Agent so it can be used for the execution of your rules and decisions.

FlexRule Runtime is bundled with the agent installer but requires a license file. In the Configurator locate your FlexRule Runtime license. If you don’t have a license file you can contact us (support@flexrule.com) to get a trial FlexRule Runtime license file.

Server IP Address and Port

These settings are for both Master and Execution Agent nodes. Each instance of Master and Agent will listen to a specific IP and Port to respond to requests.

If you installed FlexRule Server on a cloud service, use its IP address instead of using localhost.

Set up the Workbench

Workbench is a web-based application for the administration and monitoring of Flexrule Server. Workbench enables multiple users accounts with different permissions to administer and run different parts of the system. It’s hosted inside the Master node. You need to provide an address and port to use for the Workbench in the hosting configuration.

If you installed FlexRule Server on a cloud service, use its IP address instead of using localhost

Debug and Tracing

FlexRule Server lets you log and monitor events. You will likely find it useful to write these to a log file so you can investigate errors.

You can also choose to Write to the Windows System Event Log if you want to use the Event Viewer available in Windows to monitor the application.

When an error occurs on Master or Agent it is sent as an event to a particular monitoring channel (e.g. local file). The local file for logging should be different for each Master and Execution Agent.

If you’re unsure, just use the default setting.

Default Accounts

User accounts are used to manage the FlexRule Server.

Application accounts are used for the execution of rules and decisions by third-party applications (e.g. a mobile app that executes a decision).

The Admin user account is created by default to be used for administration purposes in the Workbench. You can use this account to create more accounts with different roles and access permissions using Workbench.

Admin User Account Password is used to log in to the Workbench and publish services.
Default Application Account Details are used to run services in Workbench.

Security Settings

The communication between Master, Agent, and clients is secured with different mechanisms.

In this section, you need to provide passwords for communication, encryption, and signing security tokens for authentication. In each of the three tabs, you need to enter STRONG passwords for each field. The password cannot be less than 32 characters. You can also generate the password using the provided button.

Keep note of the Auth Signing Key and the Master-Agent Shared Secret as you need to enter them again for the Agent setup.

  • Auth Signing Key and Master-Agent Shared Secret must match between Master and Agent nodes.
  • If this is a migration, the Master Encryption Password and Auth Signing Key must match the previous installation.

Database (Microsoft SQL Server)

FlexRule Server 3.0+ requires a Microsoft SQL Server database.

In the database setup section, you need to add the database server information to be used with Master and Agent nodes:

Add the database server address and database name for your database.

Add the username and password with manage access to the database server.

You can specify further optional configuration to connect to your database.

If the database does not exist on the database server, the Configurator can create it for you.
Your user credentials need to have access to create the database for this to work successfully.

Database (Azure SQL Database)

FlexRule Server is compatible with Azure SQL Database.

If using Azure, the steps are the same as above except for the Advanced tab where you need to ensure the following:

  • MS SQL AZURE database must be ticked.
  • Trust Server Certificate must be ticked.
  • Timeout must be set (e.g. 30 seconds).
  • Port number must be set to 1433.

Migration of Database

If there is an existing database with the same name, you can choose one of these options:

  1. Don’t change anything in the database.
  2. Delete and Recreate database tables.
  3. Migrate the existing database to New Version.

Final Step

You should now see the buttons Save and Create.

Click on Save to create a configuration file for either Master or Agent.

[Installation Path]\ExecAgent\FlexRule.Server.ExecAgent.exe.config

[Installation Path]\Master\FlexRule.Server.Master.exe.config

Click on Create to create a default set of data that allows you to run each Master and Agent node.
The wizard will create different sets of data as follows:

  • Master will create an application account, a user account, administrator and application roles, and permission settings for roles.
  • Agent will create an entry in the database to connect it to the Master.

Steps for Agent Configuration

Provide Runtime License location

This is the location of flexrule.license.lic file

Server IP Address and Port

If you have installed the Master server on a cloud, use its IP address instead of using localhost.

Master Instance Address

If you have installed the Master server on a cloud, use its IP address instead of using localhost

Debug and Tracing

Security Settings

You have to enter the Auth Signing Key and Master-Agent Shared Secret you entered in Master server security settings.

You can also find them in the following file.

<FlexRule server installtion location>\<version>\Master\FlexRule.Server.Master.exe.config
C:\Program Files (x86)\FlexRule\Server\9.0.178\Master\FlexRule.Server.Master.dll.config


Final Step

Save and create a database if it doesn’t exist.

Log Files

If anything goes wrong, Configurator keeps the log at the below location:

Updated on February 7, 2022

Was this article helpful?