Configures a named Rules Service with an encrypted password and, optionally, installs and starts that Rules Service. Also, optionally, first stops and uninstalls a (differently configured) Rules Service previously running on the same port. To run an anynomous Rules Service, use pc:RunRulesService instead.
•If you supply a port number (recommended), the configuration step consists of writing a configuration file in the USoft BIN directory, silently overwriting any existing file with the same name. There is no return value.
•If you do not supply a port number, no configuration file is produced. Instead, there is a return value: what would be the configuration file's contents is returned as a text document.
Calling pc:ConfigRulesService may be compared to configuring a Rules Service manually through the ure.config wizard accessible from USoft Binder's Rules Service item.
For the port attribute, typically you choose a 4‑digit port number (eg., 7777). This must be a port number not occupied by any other program on the host computer. An alternative option NOT GENERALLY RECOMMENDED is to specify port=freeport, in which case USoft Blend will assign a transient port number to the Rules Engine.
The configuration file is generated in the following location and with the following filename:
where usoft-bin-dir is the directory returned by:
SELECT RulesEngine.GetProperty( 'BinDir' )
and port is the value that you choose for the port attribute. If you omit the port attribute, no configuration file will be generated but instead, what would be its content is returned as a return value.
The required owner is the database user who owns the application tables. This is typically the same user as user.
The required password is the human-readable version of the password that will be stored in encrypted form in the configuration file.
The optional alias attribute allows you to specify a string that can be used as a handle for referring to the configured Rules Service in subsequent calls. If you do not pass alias, then the configured Rules Service can still be referenced by an internal name traceable by pointing at the alias attribute of the directive's embedded XML. If you plan to install the Rules Service as a Windows service you can refer to the name of the Windows service, so that in this case you may not need an alias. The alias value is allowed to be any literal string value.
The optional select may be used to point at an existing .config file from which you want to copy configuration settings. See "Configuring a Rules Service on the basis of an existing file".
In addition to writing a configuration file, you can start a Rules Service with the configuration described. If you want to do this WITHOUT declaring the Rules Service as a Windows service, include the following child directive:
To start the Rules Service as a Windows service, include one or more of the optional child directives instead, as necessary. (If the Windows service is new, all you need is to install and start it. If it already exists, but with a now obsolete configuration, then you want to stop and then uninstall it first.)
In this use, the <pc:RunRulesService> and the 4 <pc:Service...> directives must have empty content and they must be direct child elements of <pc:ConfigRulesService>, not grandchildren or descendent elements at a lower level.
When you install a Windows service in this way, the Rules Service is installed as a Windows service by the following name:
The list of possible attributes of pc:ConfigRulesService corresponds to the list of Rules Service settings that you can set in USoft Binder's Rules Service Property Sheet and in the ure.config wizard. Details are in the "Manual configuration..." section below.
For each optional attribute, if you omit the attribute, the indicated default will be applied.
Flatfilelocation is only allowed to be other than null if you set definitionsfrom to DictLocated.
If you omit logdir, the log directory will be set to the rules_engine subdirectory of the USoft log directory that you chose during Setup.
If you omit logfilenameprefix, the Logfile Name Prefix will be set to the value that you pass for the application attribute.