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
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Agility
      • Kanban workshop
      • Agile Fundamentals
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • 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
    • 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
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • Support
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

DOM CRUD operations from within automation script

Solved890 views6th February 2024Automation Script DOM DOM CRUD
0
Pawel Bochenek [DevOps Enabler]700 5th February 2024 0 Comments

Hello Dojo community,

I have a requirement to edit (CRUD) instances of exiting Dataminer Object Model programmatically from within a custom API automation script.

I found the following references:

https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Utils.DOM.html

https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Utils.DOM.Builders.html

The way I understand it, to i.e. create a new instance I need to do the following:

DomCache dom = new DomCache(messageHandler, moduleId);

DomHelper helper = dom.Helper;

DomInstanceBuilder domInstanceBuilder = new DomInstanceBuilder();

domInstanceBuilder.WithID(guidId);

DomInstance newDomInstance = domInstanceBuilder.Build();

newDomInstance.SetFieldValue("SectionName", "FieldName", "Initial Value", dom);

DomInstanceCrudHelperComponent instanceCrudHelp = helper.DomInstances;

instanceCrudHelp.Create(newDomInstance);

Questions:

  1. Is this the correct/optimal way?
  2. How can GUID for the new instance be auto generated?
  3. What is the recommended implementation of the MessageHandler method passed via the Func delegate when creating the DomCache object.

Many thanks.

Pawel.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6th February 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
3
Tom Waterbley [SLC] [DevOps Catalyst]8.93K Posted 5th February 2024 2 Comments

Hi Pawel,

Let me try to answer your questions:

  1. Your code will probably work, but better would be to construct the whole object before calling the Build() method. The SetFieldValue method can be replaced by the WithFieldValue() method on the builder itself.
  2. If you don't set a GUID yourself using the SetID() method, a random GUID will be assigned to the DOM instance.
  3. The MessageHandler delegate defines a way to send and receive SLNet messages for communication from the DMA.
    • In an automation script it can be used as follows:  new DomCache(engine.SendSLNetMessages, "module").
    • In a connector: new DomCache(protocol.SLNet.SendMessages, "module").

Please let me know if there are further questions.

Kind regards,

Tom

Tom Waterbley [SLC] [DevOps Catalyst] Posted new comment 6th February 2024
Pawel Bochenek [DevOps Enabler] commented 6th February 2024

Hi Tom,

Many thanks for the answers.

Tom Waterbley [SLC] [DevOps Catalyst] commented 6th February 2024

You’re welcome! I’m glad I could help.

You are viewing 1 out of 2 answers, click here to view all answers.
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
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