EventsNode: IMetabaseUpdateObjectNode;
The EventsNode property determines an update module.
Executing the example requires that the repository contains a module with Module_1 identifier, as well as the NSI_1 MDM repository, containing the Dict_1 MDM dictionary. Module structure corresponds to the structure of update module.
Sub Main;
Var
Mb: IMetabase;
MUpdate: IMetabaseUpdate;
RootFolder: IMetabaseUpdateFolderNode;
Node: IMetabaseUpdateObjectNode;
DNode: IMetabaseUpdateDataObjectNode;
Begin
Mb := MetabaseClass.Active;
MUpdate := Mb.CreateUpdate;
RootFolder := MUpdate.RootFolder;
//Update module
Node := RootFolder.Add(MetabaseUpdateNodeType.Object) As IMetabaseUpdateObjectNode;
Node.Object := Mb.ItemById("Module_1");
MUpdate.EventsNode := Node;
//MDM dictionary
DNode := RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
DNode.Method := MetabaseUpdateMethod.All;
DNode.Object := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key);
DNode.ReferenceConstraintsHandling := UpdateDataConstraintsHandlingType.Ask;
DNode.UpdatePart := MetabaseObjectUpdatePart.DataMetadataSD;
MUpdate.SaveToFileNF("C:\Update_1.pefx");
End Sub Main;
After executing this example a new update is created. A module and an MDM dictionary are included in the update. The module is updated as an update module.
See also: