Consistency review alerts CLI

The Consistency Review Command Line Interface (CRAlerts CLI) is a console executable program that queries the eRegulations content, computes a series of statistical data related to the status of steps and send an email to all the consultant users of the system.

The program is intended to be executed on a regular basis by setting a weekely (or more frequent) task in the stask scheduler.

1. Application architecture

ERegulations CR Alerts Architecture

The CRAlerts BusinessObject API uses 4 data aggregators :

  • GeneralReviewAggregator
  • GeneralStatusAggregator
  • ProcedureStatusAggregator
  • StepStatusAggregator

All the data aggregators implement the interface IDataAggegator that has only one method:

void CalculateStatistics(ConsultantUser user, IList<StructuredProcedure> data,ref Dictionary<string, object> DataBag);

The systems uses the Moustache template engine for building the html body of all the emails.


2. Config file

The CRAlert CLI program uses a config file to retrieve a list of eRegulations systems for which the job must be executed.

The config file, usually named "systems.xml" it must be written in the XML format and should have the with the following structure:

Xml mihai

where:

  • Id: the system Id (all the eRegulations systems are registered in a table SystemInstance)
  • Name: the title of eRegulations system
  • Url: the url where the eRegulations system is located
  • ConnectionSring: a valid sql connection string used to connect to the DB where eRegulations data is sored
  • LeftLogoUrl: the url of the image used as left logo in the home page
  • RightLogoUrl: the url of the image used as right logo in the home page
  • PublicSiteVersion: the value establishing the version of the public site. As for future reference to connect the URL Construction Paradigm for the hyperlinks referencing eRegulations public site pages

Feedback