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 Web UI (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.8
-
SYSPRO 8 Service Upgrade Manager
-
SYSPRO 8 e.net Communications Load Balancer
A valid endpoint must be configured in the Setup Options program of SYSPRO 8.
The following setup options must be configured to use this service:
Setup Options > System Setup > Rules Engine/Harmony
Rules Engine/Harmony System Setup
Ensure that you define which companies you want the SYSPRO 8 Rules Engine Service to monitor:
-
-
Rules Engine active company list
-
Database
Ensure that your SQL credentials are defined as the service uses these settings for its database connections.
-
Company database connection
- SQL Server name
-
SQL Server administrative information
- Administrator login
- Administrator login password
-
This service is installed using the SYSPRO Installer Application.
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.
Service operators are created by SYSPRO and are used by SYSPRO services to obtain information about SYSPRO.
The service operator code starts with a double underscore to differentiate them from other operators. A default company code must be assigned to each service operator within the Operator Maintenance program, as we use the company code to log in the service operator via e.net .
The following is a list of service operators and their function within SYSPRO:
-
The __ADSYNC service operator is used by the SYSPRO 8 Active Directory Sync Service to push Microsoft Active Directory (AD) information into SYSPRO for Active Directory managed operators.
-
The __DFM service operator is used by the SYSPRO 8 Document Flow Manager Folder Poller and SYSPRO 8 Document Flow Manager Queue Poller to monitor folders, send files to the queue and process files.
-
The __ESP service operator is used by the following services:
-
SYSPRO 8 Espresso Service,
-
SYSPRO 8 Espresso Notification Service,
-
SYSPRO Espresso Development Plugin and the
- SYSPRO Avanti Web Service to obtain information for the password reset and forgot password functionality.
-
-
The __POS service operator is used by the SYSPRO 8 Point of Sale Services to determine and validate the setup options and required credentials at start up, update the required databases and post to SYSPRO (if the Point of Sale operator doesn't have access to SYSPRO).
-
The __RUL service operator is used by the SYSPRO 8 Rules Engine Service and the SYSPRO 8 Rules Data Service.
-
The __SA service operator is used by the SYSPRO 8 Analytics service to make business object calls.
-
The __SAI service operator is used by the SYSPRO 8 Machine Learning service.
-
The __SRS service operator is used by the SYSPRO 8 Reporting Host Service and the SYSPRO 8 Cognitive Service to manage client-side report printing.
-
Only specific services use service operators to log in via e.net.
-
SYSPRO creates service operators by copying the ADMIN operator. If the ADMIN operator record doesn't exist (i.e. it may have been deleted), then the current operator is used when saving system details from the Setup Options program.
Service operators are signed in by a SYSPRO service and are used for any functionality that is required by the service to obtain information about SYSPRO.
Normal operators sign in to SYSPRO with a username and password. They access certain programs and functions to perform specific tasks.
For example:
the __SRS service operator is used by the SYSPRO 8 Reporting Host Service to obtain information about the companies in an environment, but it isn't used by the business object to retrieve the data for a report, as that would be the specific normal operator that submits the request for the report.
Using
-
Ensure that you restart the service if your Company database connection options change (SQL System Setup form within the System Setup category of the Setup Options program).
This refreshes the subscriber entry in the RulMessageQueue and clearing the old SQL connection settings.
Referencing
You should only update this file for temporary debugging purposes (i.e. not as a method to update values for the service).
Any temporary changes made to the configuration files are reset to their original installation values when this application is next updated. Because these temporary changes are not carried forward, forgetting that you made them could hamper troubleshooting efforts if unexpected issues arise.
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 © 2024 SYSPRO PTY Ltd.