Hi,
For a particular DOM if we create say on dev agent, then it has some GUIDs associated to that like for Section, Dom Definition ids etc., so while creating automation script we tend to use these values from the autogenerated code for DOM and using it as a class in C# code.
But, now if we want to move the DOM to Prod. or Staging environment then I think the GUIDs would change there and so there will be a need to change the autogenerated class of DOM in Automation scripts which involves a lot of hardcoding and manual work.
Is there ay way in which we can have use those DOM Definition ID or Section ID etc, generically, so that when the DOM and automation script when moved to other environment doesn't require change, or if we export DOM and GUIDs don't change then it would also work. Please let me the procedure or correct way how to achieve this.
eg. in Automation Script
public static class Resources
{
public static SectionDefinitionID Id { get; }
= new SectionDefinitionID(new Guid("bc6d4c8c-1588-40a2-9c0c-caff86380ca9"))
{ ModuleId = "resource_management" };
public static FieldDescriptorID DeviceID { get; }
= new FieldDescriptorID(new Guid("7469fb59-05d5-4bba-a0c7-09d67c749c90"));
and usage :
var helper = new DomHelper(engine.SendSLNetMessages, "resource_management");
var id = existingSection.GetValue<string>(Resource_Management.Sections.Resources.DeviceID).Value;
so, here if the GUID's change I need to change every time when migrating to prod or stage I need to change this Resources file again and again
Hi Apurva,
If you use the dom editor tool, you can export and import dom definitions (and instances).
The GUIDs will remain the same across different systems where you export/import.