Disabling the history by an object/action using the settings file

In ELMA, the entire history of actions with each object is recorded in the EntityModelHistory table. However, in some cases, you might need to disable the history by the types of objects and types of events.

This is why in ELMA starting from versions 3.11.36, 3.12.26 and 3.13.16, you can prohibit recording history of an object/action using the settings file EntityModelHistorySettings.xml.

The settings file is created in the configuration folder. By default, this is the UserConfig folder, which can be found in the folder with the ELMA system files. The change is tracked by the operating system, and when the file is changed, the ELMA system recalculates restrictions.

A restriction can be imposed on a system object or action. The default file contains sections for both types of restrictions. General file structure (example):

<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>

<EntityModelHistoryRestriction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


<!—prohibit doing some action with an object-->









<!—prohibit doing all actions with an object-->



</EntityRestriction> </EntityRestrictions>


<!—prohibit doing actions with some objects-->







<!-- prohibit doing actions with all objects -->







A settings file contains 2 sections:

  • EntityRestrictions;
  • ActionRestrictions.

EntityRestrictions sets rules for restrictions by an object type. When specifying an action, a restriction is imposed on a specific action, and without specifying an action - on all actions of the object.

ActionRestrictions sets the rules for restrictions by an action. When specifying an object type, a restriction is imposed on a specific object type, and without specifying an object type, on all types of objects.

Each section contains a nested structure according to the format of xml-files. The names of the nested fields are used according to the example; you cannot change them at will (this will lead to a file reading error).

It should be noted that the default recording of the entire action history for all objects of the system is allowed.