Hi Dojo,
I want to create an automation script that gets a file from a folder in a fixed dma and email it.
The problem is the script will often be accessed from another dma, which means it will find a wrong file in the client dma if I use the file path starts with 'c:\Skline Dataminer\....' Could you please advise if it is possible to include DMA name or IP address in the file path?
Thanks
Hi,
Would the answer to this question help you further: How can I execute an automation script on multiple DMA - DataMiner Dojo ? If the automation script is executed on the DMA where the file is located, it will have direct access to it to then e-mail it from there.
Regards,
Hi,
The error shown in the exception was already reported in the following question:
https://community.dataminer.services/question/issue-sending-email-from-dm-v9-6/
Thanks for your suggestion Laurens. It is similar to what I want to achieve except I don’t need to do any iterations.
I have created a separate script as a launcher to execute the script but I am getting an error. The script itself works fine without DMA specification however when I run it through the launcher script, it gives me below message from the specified DMA.
Script Failure (ExportScheduleData): (Code: 0x800402D5) Skyline.DataMiner.Net.Exceptions.DataMinerCOMException: Failed to send e-mail.
—> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800402D5
Server stack trace:
at Interop.SLAspConnection.IDMSLink.GetInfo(Int32 iType, Object varElements, Object varParams, Object& pVarData)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Interop.SLAspConnection.IDMSLink.GetInfo(Int32 iType, Object varElements, Object varParams, Object& pVarData)
at Skyline.DataMiner.Net.MessageHandler.SendGenericEmail(IConnectionInfo connInfo, SendEmailMessage req)
at Skyline.DataMiner.Net.Facade.HandleClientRequestMessage(IConnectionInfo connInfo, ClientRequestMessage oneMsg, Boolean canQueue)
at Skyline.DataMiner.Net.Facade.HandleMessageInternal(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.Facade.HandleMessage(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.BaseFacade.HandleMessages(IConnectionInfo connInfo, DMSMessage[] msgs)
at Skyline.DataMiner.Net.Facade.HandleImpersonateMessage(IConnectionInfo originalConnInfo, ImpersonateMessage im)
at Skyline.DataMiner.Net.Facade.HandleMessageInternal(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.Facade.HandleMessage(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.BaseFacade.HandleMessages(IConnectionInfo connInfo, DMSMessage[] msgs)
at Skyline.DataMiner.Net.Facade.HandleMessagesForClient(IConnectionInfo connInfo, DMSMessage[] messages)
at Skyline.DataMiner.Net.Transport.Remoting.InternalHandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
— End of inner exception stack trace —
Server stack trace:
at Skyline.DataMiner.Net.Transport.Remoting.InternalHandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
at Skyline.DataMiner.Net.Transport.Remoting.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
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) (CSharp; 0x800402d5h): (see comment for more details)
Any idea of how to resolve this please?