Method FindInteractiveClient
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
FindInteractiveClient(string, int, string, AutomationScriptAttachOptions)
Asks input from a user.
bool FindInteractiveClient(string message, int timeoutTime, string allowedGroups, AutomationScriptAttachOptions options)
Parameters
message
stringThe message to be shown.
timeoutTime
intA timeout (in seconds). When this timeout expires, the script will continue and the FindInteractiveClient method will return “False”. The script can then decide how to deal with this result: issue a new request, fail, or execute automatic actions.
allowedGroups
stringIndication of which users will receive the request, i.e. a list of DataMiner security group names, separated by semicolons. In this list of groups, you can also specify individual users. To do so, specify “user:”, followed by the user name.
options
AutomationScriptAttachOptionsOptions in the form of a set of binary flags.
Returns
- bool
true
if attaching to the interactive client succeeded; otherwise,false
.
Examples
string allowedGroups = "grpA;grpB";
bool ok = engine.FindInteractiveClient("Hello world", 100 , allowedGroups, AutomationScriptAttachOptions.None);
if (!ok)
{
engine.GenerateInformation("Could not attach");
}
else
{
engine.GenerateInformation("Attached! As " + engine.UserDisplayName);
engine.ShowProgress("A message");
engine.ShowUI("Another message", true);
}
Remarks
In an Automation script executed from e.g. a scheduled background task or as a Correlation action, you can use the FindInteractiveClient method to ask for input from a user.
In a message box, the user will be asked to click either Attach or Ignore.
- If the user clicks Attach, the script will start in a pop-up window.
- If the user clicks Ignore, the message box will be closed.
note
In DataMiner Cube, you can also use the script action Find interactive client, instead of using C#. For more information, see Find interactive client.
Exceptions
- DataMinerException
Failed to find interactive client.
FindInteractiveClient(string, int, string)
Asks input from a user.
bool FindInteractiveClient(string message, int timeoutTime, string allowedGroups)
Parameters
message
stringThe message to be shown.
timeoutTime
intA timeout (in seconds). When this timeout expires, the script will continue and the FindInteractiveClient method will return “False”. The script can then decide how to deal with this result: issue a new request, fail, or execute automatic actions.
allowedGroups
stringIndication of which users will receive the request, i.e. a list of DataMiner security group names, separated by semicolons. In this list of groups, you can also specify individual users. To do so, specify “user:”, followed by the user name.
Returns
- bool
true
if attaching to the interactive client succeeded; otherwise,false
.
Examples
string allowedGroups = "grpA;grpB";
bool ok = engine.FindInteractiveClient("Hello world", 100 , allowedGroups, AutomationScriptAttachOptions.None);
if (!ok)
{
engine.GenerateInformation("Could not attach");
}
else
{
engine.GenerateInformation("Attached! As " + engine.UserDisplayName);
engine.ShowProgress("A message");
engine.ShowUI("Another message", true);
}
Remarks
In an Automation script executed from e.g. a scheduled background task or as a Correlation action, you can use the FindInteractiveClient method to ask for input from a user.
In a message box, the user will be asked to click either Attach or Ignore.
- If the user clicks Attach, the script will start in a pop-up window.
- If the user clicks Ignore, the message box will be closed.
note
In DataMiner Cube, you can also use the script action Find interactive client, instead of using C#. For more information, see Find interactive client.
Exceptions
- DataMinerException
Failed to find interactive client.
FindInteractiveClient(string, int)
Asks input from a user.
bool FindInteractiveClient(string message, int timeoutTime)
Parameters
message
stringThe message to be shown.
timeoutTime
intA timeout (in seconds). When this timeout expires, the script will continue and the FindInteractiveClient method will return “False”. The script can then decide how to deal with this result: issue a new request, fail, or execute automatic actions.
Returns
- bool
true
if attaching to the interactive client succeeded; otherwise,false
.
Examples
string allowedGroups = "grpA;grpB";
bool ok = engine.FindInteractiveClient("Hello world", 100 , allowedGroups, AutomationScriptAttachOptions.None);
if(!ok)
{
engine.GenerateInformation("Could not attach");
}
else
{
engine.GenerateInformation("Attached! As " + engine.UserDisplayName);
engine.ShowProgress("A message");
engine.ShowUI("Another message", true);
}
Remarks
In an Automation script executed from e.g. a scheduled background task or as a Correlation action, you can use the FindInteractiveClient method to ask for input from a user.
In a message box, the user will be asked to click either Attach or Ignore.
- If the user clicks Attach, the script will start in a pop-up window.
- If the user clicks Ignore, the message box will be closed.
note
In DataMiner Cube, you can also use the script action Find interactive client, instead of using C#. For more information, see Find interactive client.
Exceptions
- DataMinerException
Failed to find interactive client.