Hi,
Is it possible to use the automation's engine methods inside a QAction?
I'd like to use some methods (e.g. SendEmail) in the Engine class (part of the Skyline.DataMiner.Automation library).
I have done the followings my QAction:
- Installed the Skyline.DataMiner.Dev.Automation NuGet package
- Imported the library (using Skyline.DataMiner.Automation;)
- Declared the engine object (Engine engine = new Engine();)
- Called the method (engine.SendEmail();)
But it failed. Errors in the Element log says:
The type or namespace name 'Engine' could not be found (are you missing a using directive or an assembly reference?)
Thanks!
Hi,
The automation library is only intended to be used in an automation script. The "engine" object in automation scripts is the connection with the SLAutomation process, similar like the "protocol" object in QActions that is the connection with the SLProtocol process.
The class library consists of 3 parts:
- Automation: functionality to be used in an automation script
- Protocol: functionality to be used in a QAction
- Common: functionality that is independent, these items can be accessed both from an automation script or from a QAction.
I can think of 2 alternatives:
- Either write an own method in the QAction to send a mail
- Or launch an automation script from the QAction that will then call the Engine.SendEmail()
Do note that the Skyline.DataMiner.Dev.Automation package is filtered out by DIS when compiling the protocol as it is not useable.