Example: Using the Aspect AqmListener custom component
The AqmListener is a custom component developed in support of a Pega® Robotic Automation Studio client proprietary application. It listens for Windows messages that are broadcast by the Aspect.Agent.Desktop application that announce when the application starts and stops recording desktop activity.
The AqmListener component has the following properties:
- Name – The design name of the AqmListener component.
- IsRecording – The value is True after the receipt of AqmStart event and prior to receipt of AqmStop event. Otherwise, the value is False.
The AqmListener component has the following events:
- AqmStart – An event is raised when the Aspect.Agent.Desktop application begins recording and broadcasts the text message 'AQM_START' to all windows.
- AqmStop – An event is triggered when Aspect.Agent.Desktop application stops recording and broadcasts the text message 'AQM_STOP' to all windows.
To add the AqmListener component to your toolbox, complete the following steps:
- In the Robotic Automation Studio Toolbox tab, right-click where you want to add the AQMListener component and select Choose Items.
- On the Pega Robotics Static Members tab, click the From Directory Location option.
- Browse to the OpenSpan.Connectors.Aspect.dll file, which is usually found in the path C:\Program Files\OpenSpan\OpenSpan.
- In the Class Name column, select the AqmListener check box.
- To save your selection, click
The AqmListener component is now in your toolbox and is available for use in Robotic Automation Studio automations.
In this example, the AqmListener AqmStart and AqmStop events are triggered by command buttons in a sample client application. Additionally, a Windows form command button Click event shows the current AqmListener state.
Published January 11, 2017 — Updated March 1, 2018