Question
Pegasystems Inc.
JP
Last activity: 15 Mar 2019 9:14 EDT
Matching Process is not initiated causing automation to fail
We have a project in which Windows Adapter (for EXCEL.EXE) and Excel Connextor are both being used.
Connector is used to open workbooks and run macros defined in them, while WindowsAdapter is used with MonitorAll, so as to be able to recognise and respond to few pop-up messages generated during the course of macro execution.
As the initialization routine, things are executed in following sequence:
WindowsAdapter.Start() -> ExcelConnector.Start() -> ExcelConnector.Open() -> Add Add-ins(optional step) -> WaitForCreate on Control corresponding to Excel's outer frame (called as frmExcel_Main) -> frmExcel_Main.Activate()
Problem is there is case when Matching process has not been initiated, which causes the logic after that to fail.
There is a custom message saying that the target Excel file does not exist, but its triggerred because the Excel file opened by ExcelConnector is not recognized by WindowsAdapter. No error in logs.
Attempted following 3 solutions:
1.Used IsCreated instead of WaitForCreate (thinking that may be the Created event was missed),
2.Tried with WaitForEvent.Created for frmExcel_Main control,
3.Tried inserting a pause of 1 second between WindowsAdapter.Start() and ExcelConnector.Start()
None of this works.
Check the attached logs for Success and Failure.
***Edited by Moderator Marissa to update SR Details***