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"> <EntityRestrictions> <!—prohibit doing some action with an object--> <EntityRestriction> <EntityName>Task</EntityName> <ActionNames> <string>Create</string> <string>Update</string> <string>Delete</string> </ActionNames> </EntityRestriction> <!—prohibit doing all actions with an object--> <EntityRestriction> <EntityName>WorkflowInstance</EntityName> </EntityRestriction> </EntityRestrictions> <ActionRestrictions> <!—prohibit doing actions with some objects--> <ActionRestriction> <ActionName>Edit</ActionName> <EntityNames> <string>WorkflowInstance</string> </EntityNames> </ActionRestriction> <!-- prohibit doing actions with all objects --> <ActionRestriction> <ActionName>Create</ActionName> </ActionRestriction> </ActionRestrictions> </EntityModelHistoryRestriction>
A settings file contains 2 sections:
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.