cancel
Showing results for 
Search instead for 
Did you mean: 

Activate works in Object, not Process

LauraBroder
Level 3
Hi, I have activate steps at the beginning of many pages in my business object. They work fine there. I have a small wait after the start, activate, and the mouse clicks to navigate. When I try to run my process, the activate steps fail with the following error: Internal : Failed to perform step 1 in Navigate Stage 'Activate' on page 'Navigate to reports' - Exception during remote setforegroundwindow - System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at BluePrism.ApplicationManager.clsLocalTargetApp.ForceForeground(IntPtr hwnd) I'm on an Azure VM, the application is Internet Explorer, the item in my application model was spied in Win 32 mode. Screenshot of element I'm trying to activate is attached.
4 REPLIES 4

John__Carter
Staff
Staff
Are you using RDP to connect to the VM? It's not a good tool as when you close the RDP window the VM's desktop is discarded until you make another RDP connection. While you are disconnected it means things like activate, mouse clicks and keystrokes cannot work.

LauraBroder
Level 3
Yes, connected via RDP. When I get the error, I'm logged into the VM, watching. Would the RDP issue still apply?

John__Carter
Staff
Staff
Hi Laura - if the RDP window is still open then no, the issue I mentioned does not apply. I guess the answer I 'no' but is anyone else logged into the same machine at the same time? That can give BP problems in working out which windows belong to you. Another option is to put a Block around the activate, Recover/Resume to neutralise the exception and then a pause and another activate (but not via a loop back to the first one). Sometimes this work around is enough for the occasional activate exception. Could it be to do with the increased speed of execution when you run the process? When you're in object studio everything runs slowly but when you call an object from a process the object page is executed at a much faster speed - could it be that the wait stages need adjustment?

NeaguEduard
Level 3
Hi, I had the same problem with activating the IE window on a virtualized runtime resource (as I nee to use the send keys command and the window must be active). The runtime and app server are virtualized using VMWare and for the remote control I am using VMware vSphere which seems to fulfill BluePrism's requirements. A summary of what I did: 1. tried focusing or clicking on an HTML element - this is not activating the window; 2. spied the entire IE window with Win32 and using the Activate Application window but it didn't work as well; 3. spied the entire IE window with Active Accessibility and using the Focus action and it didn't work; The current solution that is working for me was to spy the entire IE window with the Active Accessibility and use the Global Mouse Click action (I set X=50, Y=10, Mouse Button= blank or ""Left"") and basically the mouse pointer moves on the window's title bar and clicks somewhere near the top left corner and activates the window. I tested this on a runtime virtual resource while starting the process from the virtual server (using the scheduler) and it is working even if I am remotely connected to the runtime or not. Also I connected and disconnected remotly several times while the process was running without any problem, so the solution seems to be stable. There are some actions involving mouse click on the Win32 spied window that could also work.