We have a use case for setting parameters on a virtual element created by a redundancy group via automation. This fails with an error (shown below). I created a test script to simplify testing.
When using the test script if I provide the name of the virtual element as param1, i get the error. If I use the main or redundant element name the script runs fine. Is there something more to using a redundancy group in automation?
Test script:
string mcsName = engine.GetScriptParam("param1").Value;
Element mcs = engine.FindElement(mcsName);
string loginStatus = mcs.GetParameter(104).ToString();
Error Returned:
Skyline.DataMiner.Net.Exceptions.DataMinerException: Create Dummy Failed: 0x80004005
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80131500h):
In addition to the comment above, please double check if you’re trying to do a Set Parameter on the incorrect parameter ID.
As a general rule, you should perform sets on the “write” parameter ID and not the “read” parameter ID (https://docs.dataminer.services/user-guide/Basic_Functionality/Parameters/Types_of_parameters/Read_parameters_versus_write_parameters.html).
Hi Jim, I tried reproducing the issue by using your test script and the name of the redundancy group’s virtual element as a script param, however the get/set parameters are working fine on my end (currently running DataMiner 10.4.9).
I found a task in our records where doing a GetParameter on the virtual element of a redundancy group would throw a Create Dummy Failed exception, but this has been fixed since DataMiner 10.0, so it’s unlikely to be the same problem. Could you confirm the DataMiner version of the system you’re running this script in?
Additionally, could you check the SLAutomation logging after running the script, to see if additional error messages are shown there? You can do this in Cube by going to Apps > System Center > Logging > DataMiner, then search for Automation under the DMA you’re connected to.
If more information is present in the log file, could you please paste it here? Thanks.