Hi Dojo Community,
I have an issue when trying to execute a script from a QAction using protocol.ExecuteScript()
Currently I have two ways to add a row to a table
- Via Context Menu: The arguments are received in a QAction, then that QAction do some logic that generates the table in a csv format and send that as a parameter to a helper script
- Via Low Code App: An interactive automation script receives the new row arguments, the arguments are sent via interapp, received in the driver and set into a parameter that triggers a QAction, that QAction then do the same logic as above (generate table as csv format, send as parameter to the helper script)
However, is always failing for the second flow with this exception:
024/08/26 17:28:56.347|SLManagedScripting.exe|ManagedInterop|ERR|-1|29|Exception during execution: Cookie: 231 Content 1: VT_ARRAY|VT_VARIANT (7) 0 VT_I4 : 312 1 VT_I4 : 13918 2 VT_I4 : 14 3 VT_BSTR : RDS 4 VT_BSTR : Scripting-engine... Content 2: VT_EMPTY . System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.TryParseGuidWithNoStyle(String guidString, GuidResult& result) at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) at System.Guid..ctor(String g) at Skyline.DataMiner.Scripting.ConcreteSLProtocol.ExecuteScript(ExecuteScriptMessage message) at QAction_3000.Subscription_Helper.SubscriptionHelper.ExecuteSubscribersAction(SLProtocolExt protocol, Int32 triggerPid, String subscriptionsFolderPath, String operation, List`1 rowArguments) at QAction.Run(SLProtocolExt protocol) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at CManagedScript.Run(CManagedScript* , Int32 iDmaId, Int32 iEid, Int32 trigger, Int32 iCookie, IUnknown* pILog, IUnknown* pProtocol, tagVARIANT* varParameters, tagVARIANT* varRowInfo, tagVARIANT* pvarReturn) InnerException: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.TryParseGuidWithNoStyle(String guidString, GuidResult& result) at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) at System.Guid..ctor(String g) at Skyline.DataMiner.Scripting.ConcreteSLProtocol.ExecuteScript(ExecuteScriptMessage message) at QAction_3000.Subscription_Helper.SubscriptionHelper.ExecuteSubscribersAction(SLProtocolExt protocol, Int32 triggerPid, String subscriptionsFolderPath, String operation, List`1 rowArguments) at QAction.Run(SLProtocolExt protocol) I compared the script options sent for the two flows and they're exactly the same, but via context menu is always working. Are there any additional steps that need to be made in the second flow because of the Low Code app?
Tiago Pina [SLC] [DevOps Advocate] Answered question 27th August 2024
Hi Luis
Please see this post Executing an automation script with invalid user cookie fails - DataMiner Dojo
I think it relates to what you are facing.
Regards
Tiago Pina [SLC] [DevOps Advocate] Answered question 27th August 2024