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

Solved1.00K 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
1
João Severino [SLC] [DevOps Catalyst]13.02K Posted 7th March 2024 2 Comments

Hi Ana,

I don't think you can determine the ScriptID just from the script name and I don't believe using that SLNet message is the best way of going about canceling a running script.

The same script can be called more than once and the ScriptID is an identifier of each of those instances as you can see below.

I believe the best approach is for the script itself to have a mechanism to cancel its execution or leverage the engine.Timeout property to ensure a script does not run indefinitely.

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

Hi

In my use case, the end user really wants to abort the execution of the script from the “outside”. The end goal is to have a button for that. It shouldn’t be a situation that occurs often, but they still want to have that possibility.

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

Hi Ana,
Unfortunately, I do not think it is possible to achieve what you are after.
Besides the fact that forcibly stopping a running piece of code can cause unexpected problems and data corruption depending on the operation currently executing, to my knowledge there is no straightforward way of retrieving and identifying which script execution has which ID unless you use the source from my screenshot.
I believe your best bet will be to create a new feature request here https://community.dataminer.services/feature-suggestions to be able to cancel a running script externally as it should be implemented in a safe way that allows the script to do some cleanup before exiting similar to what a CancellationToken allows.

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