Hi all,
i wanted to try to create an interactive automation script using the IAS Toolkit. Unfortunately i ran into an issue where i get the following error when executing the script:
Script 'SES CAS Canal Plus Report Email' failed:
The following was returned from the script:
Interactive UI can only be used when running in interactive mode.
EXIT: "Something went wrong: (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Show UI Failed: 0x800402F5 (Interactive UI can only be used in interactive mode.
)
at Skyline.DataMiner.Automation.Engine.ShowUI(String uiData, Boolean requireResponse)
at Skyline.DataMiner.Automation.Engine.ShowUI(UIBuilder uiBuilder)
at Skyline.DataMiner.Utils.InteractiveAutomationScript.InteractiveController.Run(Dialog startDialog)
at Script.Run(Engine engine)"
Exception :
Interactive UI can only be used when running in interactive mode.
EXIT: "Something went wrong: (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Show UI Failed: 0x800402F5 (Interactive UI can only be used in interactive mode.
)
at Skyline.DataMiner.Automation.Engine.ShowUI(String uiData, Boolean requireResponse)
at Skyline.DataMiner.Automation.Engine.ShowUI(UIBuilder uiBuilder)
at Skyline.DataMiner.Utils.InteractiveAutomationScript.InteractiveController.Run(Dialog startDialog)
at Script.Run(Engine engine)"
To make sure i did not make any mistakes i also tried the exact example used in the documentation: Getting started with the IAS Toolkit | DataMiner Docs
But with that example Dataminer is still showing the same error message:
Would really appreciate any input on this.
Thanks in advance!
Hi Manuel,
This is a known issue.
DataMiner looks for "engine.ShowUI" in the source code of the script to determine if the script needs to be launched in interactive mode.
Now that the IASToolkit has become a NuGet, DataMiner can no longer find that line in the source code.
As a workaround, you can add the following comment anywhere in your script C# code
// DO NOT REMOVE THIS COMMENTED OUT CODE OR THE SCRIPT WONT RUN!
// DataMiner evaluates if the script needs to launch in interactive mode.
// This is determined by a simple string search looking for "engine.ShowUI" in the source code.
// However, due to the toolkit nuget package, this string cannot be found here.
// So this comment is here as a workaround.
//// engine.ShowUI();
I will update the docs to include this comment in the example.
Would be really great to add it to the documentation to avoid that others run into the same issue.
Hi Manuel,
DataMiner is trying to automatically determine if the script should be an interactive script or not. This is done by searching for "engine.ShowUI".
This would normally be in the code, but with the toolkit, this code is hidden inside the nuget.
Can you try adding this as a comment somewhere in your script:
//engine.ShowUI();
Many thanks for you quick response!!! With the additional comment it is working.
I have created a pull request to add the workaround to the examples:
https://github.com/SkylineCommunications/dataminer-docs/pull/1443
It will be added as soon as our technical writing team had a chance to review it.