Posted: 6 Jun 2019 8:20 EDT Last activity: 28 Jun 2019 8:43 EDT
Pega Robotics Studio Text Adapter Emulator Session OIA.Xstatus?
I am developing a robotic solution that opens a Reflection Workspace emulator (IBM 3270 Terminal) and navigates several screens and takes many actions. On one of the screens, I am performing a hostkey/sendkey action and I need to wait until the session has stopped processing.
Unfortunately, this could take a varying amount of time depending on the processing required (anywhere from 500 milliseconds to 45 seconds or more). The screen will not change so I cannot wait for create on a screen. When I automated with emulators using visual basic, we could always detect the session screen's OIA.Xstatus and wait for a certain status after using sendkeys.
Is there any way Pega robotics studio can detect this OIA.XStatus and wait for it to be 0 before continuing? Do I need to add specific references to the application adapter or perhaps the text adapter?
There's a NewScreenShowing event on the adapter that will fire when a new screen appears (I believe it detects a change of more than 1 character). This may be what you can wait for assuming the screen isn't changing while the processing is happening and that it does in-fact return something when it has finished. The adapter does not have anything built-in to detect that status. You could probably write something in C# against the emulator's dlls if you had access to their API. Is there anything visually that changes?
Hi. Thank you for taking time to look into this. I have added a wait for event NewScreenShowing to detect changes. This will likely work most of the time. I'm concerned about the potential for a screen not to change between methods.
For example, sending the PF2 key, in 98% of the cases, will change characters on the screen. But other times nothing will change.
In most cases, even if characters do not change, some unprotected fields will become protected. Do you know if this will indicate a NewScreenShowing event has occurred?
Thank you again for your assistance. This has been helpful.
"You could probably write something in C# against the emulator's dlls if you had access to their API."
Would you happen to have any sample code that interacts with attachmate.reflection emulators you would be willing to share? I've searched the internet for a couple of days and I can't seem to find any relevant data to get me started. We are using WinHllapi text adapters (Whlapi32.dll).