We are building a Bot that uses WinHllapi text adapter to integrate with IBM PCom Client (Image attached). The automation WORKED WELL until we tried to execute the bot remotely (Making a scheduled task and closing the RDP connection window to the virtual machine where te bot runs)
The following error appears when the Text Adapter starts: "An invalid presentation space was specified"
Do you know how we can solve the problem? Is this a problem of the Text Adapter Configuration?
The "...invalid presentation space..." message means that your short session named "A" (in your case) is not started when you start your text adapter. Make sure that your emulator is up and running and that the session is connected and configured to use short session name "A" before you start your text adapter.
Hi! Do you know how I can validate that the session is running? As I mentioned, this problem only appears when we run the bot remotely. (When we run te bot locally with an active screen it runs perfect)
Basically, you just need to evaluate your emulator to see if there's a status bar or perhaps the title of the window that tells you when they session is connected. You could also potentially just use a pause after you bring up the emulator window to give it time to connect.
You can also use the WinHLLAPIUtils component. It raises a SessionCreated event when a session is started. It has a IsActive method which will let you test for a particular session being active and finally a QuerySessions method which will return a string array of all the active sessions.