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

Abort automation script

Solved999 views8th March 2024Automation script
3
Ana Pinho [SLC] [DevOps Advocate]1.33K 7th March 2024 0 Comments

Hi Dojo,

I want to abort an automation script using:

ScriptControlMessage abortMessage = new ScriptControlMessage(DataMinerID)
{
ScriptID = scriptID, //this is the running automation script ID
Type = ScriptControlType.Detach // this aborts the script
};

How can I get the script ID when I only know the name?

IDmsAutomationScript only has Name, Description..

Thank you,
Ana

Ana Pinho [SLC] [DevOps Advocate] Selected answer as best 8th March 2024

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
Thomas Ghysbrecht [SLC] [DevOps Enabler]4.84K Posted 8th March 2024 1 Comment

Hi Ana,

It is possible to retrieve all currently running scripts using an SLNet message. It is the same message that is used to populate the table in João's reply. Do note, as João mentioned, that there could be multiple instances running for the script and that you would abort all of them if you match on name only.

After you retrieve the list, you'll have a collection of script IDs that you can loop over and pass one by one to another SLNet message that will mark the script as 'Aborted'. This will result in a 'ScriptAbortException' to be thrown, the next time the script interacts with the engine object. (E.g. when it wants to send a message to the server or get an element...) This thus behaves pretty much identical to when a script goes in timeout.

You can find a complete working sample script here: https://github.com/Skyline-ThomasGH/DataMiner_ScriptExamples/blob/main/AUTOMATION_AbortRunningScripts.xml

Do note however that this uses internal SLNet messages. I would not recommend using these for crucial production operations.

João Severino [SLC] [DevOps Catalyst] Posted new comment 8th March 2024
João Severino [SLC] [DevOps Catalyst] commented 8th March 2024

One thing I would like to emphasize is the point where Thomas mentions it will throw the exception when the script interacts with the engine object.
This means that if the script is doing something else and gets stuck or takes a long time to finish there is no guarantee the script will stop as the exception is ONLY thrown from interactions with the engine object.

You are viewing 1 out of 3 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