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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about 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)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
  • Swag Shop
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

execute qaction only once after element start

98 views4 days agoprotocol QAction
3
peng fei212 4 days ago 0 Comments

Hi:

I am writing a dataminer xml protocol. Could i have some guidance on how to setup a QAction that only being run ONCE after element start.

Thanks

José Silva [SLC] [DevOps Catalyst] Answered question 4 days ago

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
5
Bram Devlaminck [SLC] [DevOps Enabler]450 Posted 4 days ago 0 Comments

Hi,

The following sequence can be used to trigger a QAction after element startup.
Note: this will be executed every time the element is (re)started.

After startup trigger -> Action -> group -> Action -> dummy param -> QAction

The following example should help:
"""
<Params>
<Param id="1">
<Name>AfterStartupDummy</Name>
<Description>After Startup Dummy</Description>
<Type>dummy</Type>
</Param>
</Params>

<QActions>
<QAction id="1" name="After Startup QAction" encoding="csharp" triggers="1">
<![CDATA[using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

using Skyline.DataMiner.Scripting;

/// <summary>
/// DataMiner QAction Class: After Startup QAction
/// </summary>
public static class QAction
{
/// <summary>
/// The QAction entry point.
/// </summary>
/// <param name="protocol">Link with SLProtocol process.</param>
public static void Run(SLProtocol protocol)
{
try
{
// DO LOGIC HERE
}
catch (Exception ex)
{
protocol.Log($"QA{protocol.QActionID}|{protocol.GetTriggerParameter()}|Run|Exception thrown:{Environment.NewLine}{ex}", LogType.Error, LogLevel.NoLogging);
}
}
}]]>
</QAction>
</QActions>

<Groups>
<Group id="1">
<Name>After Startup</Name>
<Description>After Startup</Description>
<Type>poll action</Type>
<Content>
<Action>2</Action>
</Content>
</Group>
</Groups>

<Triggers>
<Trigger id="1">
<Name>After Startup</Name>
<On>protocol</On>
<Time>after startup</Time>
<Type>action</Type>
<Content>
<Id>1</Id>
</Content>
</Trigger>
</Triggers>

<Actions>
<Action id="1">
<Name>After Startup Group</Name>
<On id="1">group</On>
<Type>execute next</Type>
</Action>
<Action id="2">
<Name>After Startup QAction</Name>
<On id="1">parameter</On>
<Type>run actions</Type>
</Action>
</Actions>

"""

More information about the After startup trigger and how this works in DataMiner can be found here.

Hope this helps!

Kind regards,

Bram Devlaminck [SLC] [DevOps Enabler] Edited answer 4 days ago
0
José Silva [SLC] [DevOps Catalyst]1.52K Posted 4 days ago 0 Comments

Hi peng,

Bram is absolutely right — the correct flow to use is:

After startup trigger -> Action -> group -> Action -> dummy param -> QAction

If you'd like to better understand the different actions that occur during element startup, I recommend reading this article:

Use case: Internal flow – element startup | DataMiner Docs

Let me know if you have any questions!
Kind regards,

José Silva [SLC] [DevOps Catalyst] Answered question 4 days ago
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