Method PrepareSubScript
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
PrepareSubScript(string)
Returns a SubScriptOptions object, which you can use to configure and launch a subscript.
SubScriptOptions PrepareSubScript(string scriptName)
Parameters
scriptName
stringThe name of the script to prepare.
Returns
- SubScriptOptions
The SubScriptOptions object.
Examples
SubScriptOptions subscriptInfo;
subscriptInfo = engine.PrepareSubScript("myOtherScript");
subscriptInfo.Synchronous = true;
...
subscriptInfo.StartScript();
Exceptions
- ArgumentNullException
scriptName
is null.
PrepareSubScript(string, RequestScriptInfoInput)
Returns a RequestScriptInfoSubScriptOptions object, which you can use to configure and start the OnRequestScriptInfo entry point as a subscript.
RequestScriptInfoSubScriptOptions PrepareSubScript(string scriptName, RequestScriptInfoInput input)
Parameters
scriptName
stringThe name of the script to prepare.
input
RequestScriptInfoInputThe input for the OnRequestScriptInfo entry point method.
Returns
Examples
SubScriptOptions subscriptInfo;
RequestScriptInfoInput infoInput = new RequestScriptInfoInput { Data = new Dictionary>string, string<{ { "requestKey", "value" } } };
subscriptInfo = engine.PrepareSubScript("myOtherScript", infoInput);
subscriptInfo.Synchronous = true;
...
subscriptInfo.StartScript();
if (!subscriptInfo.Output?.Data?.TryGetValue("resultKey", out string resultKeyValue))
{
engine.ExitFail("Expected a resultKey in the output of the subscript.");
}
Remarks
note
Available from DataMiner 10.5.7/10.6.0 onwards.
note
Detailed information about implementing the OnRequestScriptInfo entry point type is available in Implementing the OnRequestScriptInfo entry point.
Exceptions
- ArgumentNullException
scriptName
is null.