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

NotifyProtocol 221 vs CheckTrigger – which is more ideal?

Solved1.12K views18th October 2021action checktrigger notifyprotcol trigger
3
Alex Johnson [SLC] [DevOps Advocate]836 28th July 2021 0 Comments

Hi all,

I was looking at some code and got curious, because i haven’t seen this NotifyProtocol very often (if at all):

protocol.NotifyProtocol(221/*NT_RUN_ACTION*/, 49, null);

Is there a difference/increase in efficiency for using CheckTrigger -> Trigger -> Action vs NotifyProtocol 221 to directly run an action?

Alex Johnson [SLC] [DevOps Advocate] Selected answer as best 18th October 2021

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
9
Laurens Moutton [SLC] [DevOps Enabler]8.81K Posted 29th July 2021 0 Comments

Hi,

That depends on the situation.

A CheckTrigger executes the content of the trigger.
Pros: Conditions can be added to execute if-else actions. Multiple actions can be executed. Existing triggers can be re-used. More clear for a future developer if a trigger exists that it could be used somewhere in a QAction. Easier for the (future) validator to analyze if the trigger actually exists.
Cons: Developer needs to add xml tags for the trigger. Slight performance cost as SLProtocol first needs to check the content of the trigger before executing the actions if only one action needs to be executed.

An NT_RUN_ACTION directly executes the action that needs to run.
Pros: Don’t need to add xml tags for the trigger. Directly targets the action to be executed.
Cons: When multiple actions need to be executed (multiple NotifyProtocols) then this will come with a higher performance cost as more inter-process calls between SLScripting and SLProtocol are needed.

To summarize: if you only need to execute one action from a QAction then the NT_RUN_ACTION will have a slight performance gain and it will save some developing time because the trigger xml doesn’t need to be added. However, I would clearly add a comment next to that action indicating that it is being used in a QAction, else a future developer could think that the action is not used and could be tempted to remove it.
Definitely use a CheckTrigger as soon as more actions need to be executed (and I would not start refactoring existing drivers that have a CheckTrigger with one action, as the performance gain will not really be noticeable)

Alex Johnson [SLC] [DevOps Advocate] Selected answer as best 18th October 2021
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