Files
richard-churchman 5f6bbe45f7 A major refactoring of the software to make model IDs less volatile between Import, Export, and Peek (comparison) of the model configuration environment. As part of the extensive refactor, most tables have been updated to include a GUID field, which is consistent across Import, irrespective of the IDs remaining volatile. The consistent GUID allows for the separation of production (i.e., Case, Transaction, and Counter data), Redis cache data and quasi-production data(i.e, Lists, Suppressions, and Dictionaries) from the configuration environment. Significant rework of Controllers, Repositories and POCOs to support GUID as an access path rather than ID.
Major bug fixes relating to the Redis implementation in Reprocessing and Search Key Cache were identified and fixed as part of the rekeying development.

Included functionality to stop the Exhaustive training.  Fixed the Unsupervised learning functionality in Exhaustive Training.  Embedded the Mock Data CSV data into a class to make it compatible with Docker without needing to modify the Dockerfile (i.e, build).  Included a new table that stores training data to enhance support capabilities for Exhaustive.

Reintroduced and validated the Multitenancy functionality.

Postgres is now fully deprecated in place of Redis for cache, and all implementations of the Interfaces for Postgres have been removed.  No migrations exist to support this deprecation, and Postgres as a cache is now wholly unsupported.  Removed the Indexing background thread,  as Redis does not require it, given that it is a key-value pair database.

Created a RedisCommandFlag Environment Variable to support Fire and Forget write to Redis in Invocation.

Implemented functionality to Export, Peek and Download configuration environments using a secure, encrypted scheme.  Created a permission to access the functionality via the user interface.  Extensive database-based logging is included to provide for a comprehensive audit.  Created functionality to Import the encrypted Export file inside a database transaction to ensure consistency.

As Docker is now the primary deployment model, log4net instantiation has been moved to an approach that primarily uses programmatic instantiation of the ConsoleLogger and RollingFileAppender given Environment Variables. Implemented functionality to support remote \ mounted Log4Net XML Serialisation files for more advanced log4net configurations.

Reintroduced access to counters via the user interface and created a permission.

Took the opportunity to implement ReSharper linter suggestions.

Disabled the Lock button across the whole application, with that functionality being reserved for future use. It is intended that locking happens programmatically on the basis of dependencies in future commits.

Fixed several significant end-use bugs which became apparent during testing of the refactored code relating to case management and visualisations.  Fixed certain other minor bugs that came up during testing.

Brought documentation up to date for this commit.

Brought the Docker Compose file up to date for this commit.

Removed Redundant Environment Variables for this commit.

Made the README file less verbose and unnecessary.
2025-08-13 19:01:08 +03:00

4.5 KiB

layout, title, nav_order, parent, grand_parent
layout title nav_order parent grand_parent
default Activation Rule Notifications 17 Models Configuration

🚀Speed up implementation with hands-on, face-to-face training from the developer.

Activation Rule Notifications

It is possible to send Email and SMS notifications as a consequence of an Activation Rule having matched, with Notification configuration strings being available for tokenization (i.e. swapping values with that available in the processing for the purposes of providing context to the recipient).

It is important to note that the Engine must be configured to use SMTP gateway in the case of email by updating Environment Variables:

SMTPHost=email.emailhost.com
SMTPPort=587
SMTPUser=UsernameExample
SMTPPassword=PasswordExample
[email protected]
Value Description
SMTPHost The SMTP host name.
SMTPPort The SMTP port name.
SMTPUser The SMTP user name for authentication.
SMTPPassword The SMTP password for authentication.
SMTPFrom The email address where the email will be received from.

Likewise the Clickatell gateway in the case of SMS, using the value in the Environment Variable:

ClickatellAPIKey=APIKeyFromClickatell
Value Description
ClickatellAPIKey The API Key provided by Clickatell.

In all instances if the engine instance is to dispatch notification it must be enabled via an Environment Variable:

EnableNotification=True
Value Description
EnableNotification Enables Notification dispatch from the engine either via AMQP or internal concurrent queue.

To send a notification asynchronously on Activation Rule match, navigate to rule that was created beforehand, titled Volume1DayUSDForIPOver100, clicking on it for the purposes of editing:

Image

Scroll down to the Notification switch:

Image

Check the Notification check box to expand on Notification options:

Image

All fields for a Notification support tokenization which will swap values enclosed in [@ @] brackets with a corresponding value. For example, the AccountID is present in model definition, hence will be available in the payload. To instruct the AccountID to be swapped in during processing, the value would be tokenized as [@AccountID@].

In this example a notification will be sent to [email protected], showing some elements of tokenization.

The process to send an SMS over an Email is similar, except for radio buttons between SMS and email, and the subject being ignored in the case of SMS.

Complete the notification section of the Activation Rule:

Image

Scroll down to update the Activation Rule with a new version:

Image

Synchronise the model via Entity >> Synchronisation and repeat the HTTP POST to endpoint https://localhost:5001/api/invoke/EntityAnalysisModel/90c425fd-101a-420b-91d1-cb7a24a969cc for response.

There will be no noticeable difference to the response payload, however, an email will have been dispatched asynchronously.

Receipt of the email can be observed on inspection of the email addresses Inbox, that the message has been received and correctly tokenized:

Image

Only plain text emails are supported.

Exactly the same tokenization process would take place given an SMS selected, although the destination would need be the telephone number as per the Clickatell API specifications. The subject is ignored in SMS dispatch. To send SMS, simply change the Notification Type from Email to SMS and change the email from [email protected] to a mobile telephone number (noting in the Clickatell API this should be + and not 00 for the country code at the time of writing).