SYSPRO 8 Rules Engine Service
Exploring
This service processes the data extracted by the SYSPRO 8 Rules Data Service after monitoring the SYSPRO transaction log.
The service is responsible for:
- Processing each log entry relayed by the SYSPRO 8 Rules Data Service service.
- Gathering the required data and calculating the additional values required.
- Evaluating sets of conditional statements.
- Executing all actions required per rule.
This service communicates to the following platforms:
- SYSPRO Espresso
- SYSPRO Avanti
This service is used by:
- SYSPRO Rules Engine
- SYSPRO Harmony
Rules consist of conditions and actions.
A condition is evaluated and (if true) the SYSPRO Rules Engine initiates the defined actions.
Actions are executed when the conditions of a rule are met.
For example:
These actions range from displaying a Harmony message, to creating a log file in a specific location, or tracking the history of a specific database column.
Conditions act as triggers that initiate a specific action according to how they have been configured.
They let you fine-tune a rule with the records to be excluded and when certain actions must be performed (i.e. they act as a set of conditional expressions that must be met before any rule actions are performed).
A rule target indicates the database table to which a rule applies, as well as the operation on that table (e.g. All, Insert, Update or Delete).
Targets can be set as company-specific or system-wide.
Variables are used to define or manipulate any values required in the conditions or actions of a rule. The different property packets of a variable include the following:
Variable | Description |
---|---|
New |
Variables that begin with this property packet contain the new values of a record after an insert or update occurs. They are only available for Insert or Update type operations. |
Old |
Variables that begin with this property packet contain the previous value of a record before an update or delete occurs. They are only available for Update or Delete type operations. |
Current |
Variables that begin with this property packet contain the current value of a record. This is useful if the record has changed since the SYSPRO 8 Rules Data Service flagged the transaction. Most of the time these values are the same as the New variables. We recommend using the New property packet, as Current variables have a slight overhead. |
Global |
Variables that begin with this property packet are values related to the transaction, such as:
|
Var |
Variables that begin with this property packet are custom variables that have been defined in the Variables pane of the Rules Administrator program. |
Starting
-
Microsoft .NET Framework 4.6
-
SYSPRO 8 Service Upgrade Manager
-
SYSPRO 8 e.net Communications Load Balancer
A valid endpoint must be configured in the System Setup program of SYSPRO 8.
The following setup options must be configured to use this service:
SYSPRO Ribbon bar > Setup > General Setup
Rules Engine/Harmony
Ensure that you define which companies you want the SYSPRO 8 Rules Engine Service to monitor:
-
-
Active company list
-
Database
Ensure that your SQL credentials are defined as the service uses these settings for its database connections.
-
Database connection
- SQL Server name
-
SQL Server administrative information
- Login
- Password
-
This service is installed using the SYSPRO Installer.
Solving
You can debug this service by editing the associated config file in elevated mode (i.e. with administrator privileges).
The SYSPRORulesEngineService.exe.config file is located in the in the folder to which you installed the service.
You can view monitoring and troubleshooting messages about this service using the Event Viewer function in Windows:
(Control Panel > System and Security Administrative Tools > Event Viewer > Applications and Service Logs)
This service outputs an event log to the SYSPRORUL file.
You can start, stop, restart and configure this service using the Services function in Windows:
(Control Panel > System and Security Administrative Tools > Services)
The SYSPRO 8 Rules Engine Service has the following internal interval loops:
-
MessageQueueLoop
This loop retrieves records highlighted by the SYSPRO 8 Rules Data Service and processes the appropriate rules for each of these transactions.
This process evaluates all variables and conditions and prepares a list of actions to process for each rule.
The default delay (MessageQueueLoopDelay) for this loop is 10 seconds.
-
ActionQueueLoop
This loop sequentially processes all the actions queued by the MessageQueueLoop.
The default delay (ActionQueueLoopDelay) for this loop is 11 seconds.
-
RefreshLoop
This loop refreshes all data for the service.
This includes updating the list of active rules, checking for a service update, and retrieving the latest database schemas for all active companies.
The default delay (RefreshLoopDelay) for this loop is 61 seconds.
The actions processed between the MessageQueueLoop and ActionQueueLoop are persisted to the \Temp folder for the Service User.
For example:
C:\Windows\Temp\SYSPRO_8_RulesEngineService_Persistence
This persistence file is used to process any forwarded actions in case the service shuts down before processing all required actions.
Settings are refreshed with each Refresh Loop, excluding loop delay settings.
Therefore, for changes to loop delays (or to have new settings apply immediately) we recommend refreshing the service.
Using
-
Ensure that you restart the service if your Database connection options change (Database tab of the System Setup program).
This refreshes the subscriber entry in the RulMessageQueue and clearing the old SQL connection settings.
Referencing
You should only edit this file for debugging purposes.
Don't use this as a method to update values for the service. This is because a wizard installation updates the system registry, which is what is read when using the service. A fresh installation overwrites these values, which may cause problems when you next run the service.
Key | Description |
---|---|
BaseDir |
This indicates the SYSPRO instance to use when connecting to the SYSPRO 8 e.net Communications Load Balancer service. The default is 8. |
MessageQueueLoopDelay (milliseconds) |
This indicates how often the service must read the Message Queue table. The default is 10000. |
MessageQueueBatch |
This indicates how many records the service must retrieve from the Message Queue table. The default is 1000. |
ActionQueueLoopDelay (milliseconds) |
This indicates how often the service must process the action queue The default is 11000. |
ActionQueueBatch |
This indicates how many actions the service must action from the Action Queue. The default is 1000. |
RefreshLoopDelay (milliseconds) |
This indicates how often to refresh data for the service, including:
The default is 61000. |
Debug specific options |
|
CreateDetailsLog |
This creates an output log in the temp drive = C:\Windows\Temp\SYSPRORulesEngine_Detail_{date}.Log The default is False. |
FullErrorLogging |
This outputs a full error message including stack trace. The default is False. |
MessageQueuePurge |
This deletes processed transactions from Message Queue. The default is True. |
Debug |
This creates extra debug logging lines. For example: Rule ID with Harmony Beat. The default is False. |
ConstantRefresh |
This refreshes rules before every MessageQueueLoop. This is useful to apply new rules immediately. The default is False. |
Copyright © 2021 SYSPRO PTY Ltd.