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 button on Automation Script

Solved755 views18th June 2024Abort Aiutomation
1
Mark Smith [DevOps Member]149 13th June 2024 0 Comments

I have a user interaction box in my script

It produces the attached display and works fine

Capture.PNG

But when the “abort” button in that box is pressed the script continues setting variables.

Do I need to add something to the script to make the abort button actually abort the script?

Apologies for another newbie question!

Mark Smith [DevOps Member] Selected answer as best 18th June 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Thomas Ghysbrecht [SLC] [DevOps Enabler]4.84K Posted 17th June 2024 3 Comments

Update 2024-06-18:

After receiving the script XML it was found that the script in question is using the graphical UI blocks instead of C# code. These blocks behave differently, so the explanations that were already given would indeed not apply here. Note that aborting a ‘User interaction’ block will result in this block being skipped without any variable sets. It is up to the user to then make sure that the following conditions will only trigger logic if a button has been pressed. An ‘if’ condition could be added that will check whether one of the button variables were set, and use the ‘Exit’ action to stop the script if that would not be the case.

In general, I would recommend moving to C# code for many reasons including: best compatibility, feature availability and future support.

Original reply:

Hi Mark,

Could you share the DataMiner version you are using? As Tom mentioned in his reply, if you abort the script, an exception should be thrown. Here are more details on this flow.

When you click the abort button, or close the window in the top right (+confirm), a ‘detach’ request will be sent to the script. This will result in the script not running interactively anymore, and cause the ‘ShowUI’ method to throw the ‘InteractiveUserDetachedException’. If this exception were caught and ignored (try/catch, or ignored when wrapped in a ‘Task’), the script will just continue running. In any case, the cube window should close when pressing that button, can you confirm that this is the case?

One thing you could do to check this is find the line with ‘ShowUI’ where the script is currently waiting on when showing the interactive UI and wrap it with a ‘try-catch’ statement and log the exception in an information event. Then try to abort the script using the button and check the information events to see whether the exception was thrown as expected. This could already help to identify if the button is the issue, or the script. If you use the IAS Toolkit, you can put the line where you call ‘Run’ on the controller between the ‘try’ statement.

Mark Smith [DevOps Member] Selected answer as best 18th June 2024
Mark Smith [DevOps Member] commented 17th June 2024

Version in use:-
DataMiner (10.2.0.0-12603-CU11)
I’m trying to attach the xml export of my script bur the comments box here only alllows text – what’s the best way to send the script to you?

Thomas Ghysbrecht [SLC] [DevOps Enabler] commented 17th June 2024

Thanks for sharing the version. You could use an online sharing service like ‘https://pastebin.com/’ to share the XML if you are fine with it being public. You can also send it privately to my e-mail address: ‘thomas.ghysbrecht@skyline.be’.

Thomas Ghysbrecht [SLC] [DevOps Enabler] commented 18th June 2024

Hey Mark, I sent you a reply on the email and updated my response. Let me know if the suggested change fixes your issue.

1
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 13th June 2024 3 Comments

Hi Mark,

An exception of type InteractiveUserDetachedException or ScriptAbortException will be thrown when the script is being aborted. For more information, see https://docs.dataminer.services/user-guide/Advanced_Modules/Automation_module/FAQ/How_do_I_abort_a_running_Automation_script.html

Mark Smith [DevOps Member] Posted new comment 16th June 2024
Mark Smith [DevOps Member] commented 14th June 2024

From the url you sent me:-
If a user aborts an interactive script, this will generate the exception “InteractiveUserDetachedException”, which can optionally be handled in the code of the script. If it is not handled in the script, by default the script will shut down. Otherwise, the further implementation of the code in the script will determine what happens with the script execution.

I don’t handle the exception in my script so why doesn’t the script shut down when the user presses the abort button in the user interaction box?

Tom Waterbley [SLC] [DevOps Catalyst] commented 15th June 2024

Hi Mark, the exception is only being thrown when an automation method (i.e. engine.Sleep, engine.ShowUI, element.SetParameter, …) is being executed. Is it possible that your script is busy with a long operation without any interaction with DataMiner?

Mark Smith [DevOps Member] commented 16th June 2024

Hi Tom,
I don’t think its an exception issue.
It’s just that the abort button that dataminer adds to a “ui” box doesn’t actually do anything.

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