Scope: managed applications, mobile applications, and ordinary applications.
1. Each configuration needs to have functionality that automatically detects when the configuration is started for the first time and fills in the infobase with the minimum required data. It also needs to have functionality that detects when a new release is started for the first time and makes necessary changes to the infobase (infobase data update).
If Standard Subsystems Library is used in the configuration, such functionality is provided by the "Infobase version update" subsystem.
If Standard Subsystems Library is not used in the configuration, see general requirements for getting started with the configuration below.
4. Situations when processing is not performed in the necessary volume must be controlled by the configuration. A warning message notifying a user of the issue must be displayed. To display a detailed report on performed operations and occurred errors, use the event log.
5. If the configuration supports distributed infobases, implement the logic of infobase data update in subordinate nodes so that:
- It is performed after the updated data is loaded from the master node.
- It prevents the same data from being reprocessed and new data from being regenerated. In other words, infobase reprocessing must function correctly.
Otherwise:
- If new data is unconditionally generated upon updating a subordinate infobase node, this data is generated multiple times in each node of the distributed infobase and multiplied in all nodes upon the next data exchange.
- If some data is unconditionally changed upon updating a subordinate infobase node, this data is registered for loading back into the master node. This leads to additional overload on communications link between nodes.
Incorrect:
ProfileObject = Catalogs.AccessGroupProfiles.CreateItem();
ProfileObject.Description = NStr("en = "Accountant");
ProfileObject.PresetAccessKind = True;
ProfileObject.Write();
Correct example:
ProfileDescription = NStr("en = "Accountant");
Query = New Query(
"SELECT
| TRUE
|FROM
| Catalog.AccessGroupProfiles AS AccessGroupProfiles
|WHERE
| AccessGroupProfiles.Description = &Description AND
| AccessGroupProfiles.PresetAccessKind = TRUE");
Query.SetParameter("Description", ProfileDescription);
// If there is no item, create the new one.
If Query.Execute().IsEmpty() Then
ProfileObject = Catalogs.AccessGroupProfiles.CreateItem();
ProfileObject.Description = ProfileDescription;
ProfileObject.PresetAccessKind = True;
ProfileObject.Write();
EndIf;