Hello Team,
I have created an automation script, which does some background process and creates a reference id and the concatenate it at the end of the URL. I would need it to be auto opened on the users machine who has triggered this automation script via Dataminer cube.
Lets take an example I want to redirect the user to https://docs.dataminer.services/index.html on their browser after completion of the automation script.
As of now I am using a pop up to show this URL to the users. And they manually copy paste it on browser. Also not sure if the URL can be made clickable on popup.
Could you please help me to find how to achieve redirection and if it's not possible what is other alternative to make it user friendly
Does this work for you?
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Skyline.DataMiner.Automation;
/// <summary>
/// DataMiner Script Class.
/// </summary>
class Script
{
/// <summary>
/// The Script entry point.
/// </summary>
/// <param name="engine">Link with SLAutomation process.</param>
public void Run(Engine engine)
{
UIBuilder uib = new UIBuilder();
UIBlockDefinition uibd = new UIBlockDefinition();
uibd.Type = UIBlockType.Executable;
uibd.Extra = @"http://www.google.be";
uib.AppendBlock(uibd);
var result = engine.ShowUI(uib);
}
}
and if you show it as a button on your UI and start this script after pressing the button?
On Alarm console we have added a hyperlink which triggers the automation script with respective inputs.
The Automation Script is launched from an Alarm Console hyperlink. The script creates a Spark ticket and uses UIBlockType.Executable to open the returned URL. Is there a supported way to launch the URL on the Cube client without displaying the Automation execution dialog (engine.ShowUI) or using an alternative client-side API?
Hi Ramesh, the example of Peter should work. There may be a small window that appears briefly, but this should disappear once the instruction to open the web page has been approved by the user & handled by the browser. There will be a confirmation screen in Cube for security reasons, but it is possible to check a box so it is not shown anymore in the future for that user. After approving & checking that box, the subsequent triggers of the script should Could you elaborate on what would prevent you from using this approach?
Yes Now I am able to redirect to the browser. But Since we are using ShowUI I got the executable screen where we enter input data on the background. I would like to hide it. I just want to show the URL UI which redirects to browser