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
    • 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
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

SLNet subscriptions and finding the status of other element(s)?

Solved503 views1st November 2024elements QAction SLNet subscriptions
2
Alex Johnson [SLC] [DevOps Advocate]836 30th October 2024 0 Comments

Hi Dojo,

I am currently working on a connector where a user can specify elements in a table, then when found it will subscribe to it and update an “Element State” column to determine if the element is active/stopped/paused/deleted etc.

So the flow is user sets element, check if exists, add subscription, and on element state message it updates the table.

Problem is, I don’t think I’m receiving the message -columns not receiving update.

I have the following handler:

Called from here:

Is there a better way to do this?

Bonus question: Logs don’t work on the handler – this is because the SLProtocol object is not initialized at that point, right?

Alex Johnson [SLC] [DevOps Advocate] Selected answer as best 1st November 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
João Severino [SLC] [DevOps Catalyst]13.09K Posted 31st October 2024 0 Comments

Hi Alex,

From your screenshots, I believe you are subscribing to the current element alone and not to a “secondary” element that appears to be your goal.

protocol.DataMinerId and protocol.ElementId will return the current element’s details however I believe that from your description you should be using details from the row object.

Regarding your bonus question, you should think about that method (and any event handler) as a static method running elsewhere that needs to be as efficient as possible.

Prior to the DMS Monitors that Tom suggested, what we used to do was to do a SetParameter via SLNet with the event data, in your case, element details and state, to a parameter that would trigger a QAction and at that point, you would have access to the SLProtocol object and anything you could need.

But with the DMS Monitors library, all of that is taken care of for you and you will have a smoother experience.

The library also has an extra step that you would otherwise need to handle yourself that is managing the subscription set and cleaning up when your own element stops or gets deleted.

Alex Johnson [SLC] [DevOps Advocate] Selected answer as best 1st November 2024
0
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 31st October 2024 0 Comments

Hi Alex,

I don’t immediately see a mistake in your code. But maybe you could try using DMS monitors instead of setting up the subscriptions yourself. With that library it should be easier to setup receiving events when something changes.

https://docs.dataminer.services/develop/devguide/ClassLibrary/ClassLibraryMonitors.html

Tom Waterbley [SLC] [DevOps Catalyst] Answered question 31st October 2024
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