Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

DOM Optional Multiple Sections

Solved442 views3rd January 2025Automation Script DOM DOM
6
Jan Palansky [DevOps Advocate]178 20th December 2024 0 Comments

Hi Dojo,

I'm trying to create DomInstance with optional and multiple sections of particular section definition and got error about InvalidSections and DomInstanceDoesNotContainRequiredModuleSections.

It is allowed in DomDefinition

my code:

var myInstance = new DomInstance() {DomDefinitionId = serviceDomDef.ID, StatusId = "draft"};

var serviceSecDef = domHelper.SectionDefinitions.Read(SectionDefinitionExposers.Name.Equal("section_service")).FirstOrDefault();
var inputSecDef = domHelper.SectionDefinitions.Read(SectionDefinitionExposers.Name.Equal("section_input")).FirstOrDefault();
var outputSecDef = domHelper.SectionDefinitions.Read(SectionDefinitionExposers.Name.Equal("section_output")).FirstOrDefault();

var mySection = new Section(serviceSecDef);
mySection.AddOrUpdateValue(serviceSecDef.GetAllFieldDescriptors().FirstOrDefault(fd => fd.Name == "ServiceName"), "TestName");
myInstance.Sections.Add(mySection);

/////////////////// INPUT SECTION ////////////////////////
mySection = new Section(inputSecDef);
mySection.AddOrUpdateValue(inputSecDef.GetAllFieldDescriptors().FirstOrDefault(fd => fd.Name == "InDstIP"), "1.2.3.4");
myInstance.Sections.Add(mySection);

/////////////////// SECOND INPUT SECTION ////////////////////////
mySection = new Section(inputSecDef);
mySection.AddOrUpdateValue(inputSecDef.GetAllFieldDescriptors().FirstOrDefault(fd => fd.Name == "InDstIP"), "5.6.7.8");
myInstance.Sections.Add(mySection);

/////////////////// OUTPUT SECTION ////////////////////////
mySection = new Section(outputSecDef);
mySection.AddOrUpdateValue(outputSecDef.GetAllFieldDescriptors().FirstOrDefault(fd => fd.Name == "OutDstIP"), "4.3.2.1");
myInstance.Sections.Add(mySection);

domHelper.DomInstances.Create(myInstance);

I got error:

Error Creating Instance: Exception of type 'Skyline.DataMiner.Net.ManagerStore.CrudFailedException' was thrown.
Error reason: DomInstanceDoesNotContainRequiredModuleSections
TraceData: (amount = 1)
- ErrorData: (amount = 1)
- ErrorReason: DomInstanceDoesNotContainRequiredModuleSections, DomInstance: DomInstance[3ced7b30-9083-472d-944d-d8d6b271ea69], DomInstanceName: , InvalidSections: SectionDefinitionID[48bdaef5-d26f-4a09-92a2-49f0f72ae910],

My DomDefinition looks like:

{
"Id": {
"Id": "af30687a-a6c6-4c51-b83a-9055074b1071",
"ModuleId": "headend_test"
},
"SectionDefinitionLinks": [
{
"SectionDefinitionID": {
"Id": "8fa03266-483d-4b9c-a3dc-f0ac5112c159",
"ModuleId": "headend_test"
},
"IsSoftDeleted": false,
"IsOptional": false,
"AllowMultipleSections": false
},
{
"SectionDefinitionID": {
"Id": "48bdaef5-d26f-4a09-92a2-49f0f72ae910",
"ModuleId": "headend_test"
},
"IsSoftDeleted": false,
"IsOptional": true,
"AllowMultipleSections": true
},
{
"SectionDefinitionID": {
"Id": "83f7c76a-c9ae-4474-8b92-3d271a4f5ada",
"ModuleId": "headend_test"
},
"IsSoftDeleted": false,
"IsOptional": true,
"AllowMultipleSections": true
}
],
"Name": "Service",
"VisualStructure": {
"SectionDefinitionInfos": [
],
"IsHidden": false
},
"BehaviorDefinitionId": null,
"ModuleSettingsOverrides": {
"NameDefinition": null
},
"SyncLastModified": "2024-10-24T11:26:45.2650291Z",
"LastModifiedBy": "Administrator",
"CreatedAt": "2024-09-27T12:34:41.5468175Z",
"CreatedBy": "Jan Palansky"
}

It works for singular sections. I also tried create instance without input and output section (which are optional) and also got simillar error.

Can you please help me?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 3rd January 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Thomas Ghysbrecht [SLC] [DevOps Enabler]4.80K Posted 23rd December 2024 1 Comment

Hi Jan,

Thanks for sharing your issue with this detailed post. The error you are seeing (DomInstanceDoesNotContainRequiredModuleSections) is one related to the 'Module Sections' concept. If a SectionDefinition is marked as a 'Module Section', that means that exactly one section needs to be present for it on all DOM instances in the module.

You can find the error and description in this table of the docs: https://docs.dataminer.services/user-guide/Advanced_Modules/DOM/DOM_objects/DomInstance.html#errors

Note that only one section can be present, meaning that defining multiple sections (or none) for a 'Module Section' is not supported.

These 'Module Sections' are configured as a list of IDs on the ModuleSettings. Was this SectionDefinition's ID added to this list with the intention to use this concept, or was this rather accidental? If that was not really intended, removing the IDs from that list should fix the errors for you. So far, we haven't seen this 'Module Sections' concept be used, so there are currently no plant to add support for configuring multiple section for those.

If you are using the DOM editor IAS UI, you can find this list under 'Manager Settings' > 'Module Sections'. Deselect the SectionDefinitions that should support optional/multiple sections, click back & apply. If you manage your configuration via code, that list of IDs can be found here: ModuleSettings.DomManagerSettings.ModuleSections.

Let me know if anything would be unclear or if you have additional questions.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 3rd January 2025
Jan Palansky [DevOps Advocate] commented 23rd December 2024

Hi Thomas, thank you very much for help and explanation. You are right, that all sections was accidently set as Module sections. I unmark them and now it works fine.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin