cancel
Showing results for 
Search instead for 
Did you mean: 

Attach issue with Windows based Application

GnanaRaj
Level 3

Hi All, I am working on to automate a home grown windows based application. While attaching to this application with blueprism, the application crashes. This works well in UAT but in prod it happened to crash. What could be causing the issue. We tried to change the parameters to attach and still facing this issue. 

10 REPLIES 10

PvD_SE
Level 12

Hi Gnana,

What exception do you get when it crashes or right before it crashes?

Does the windows application launch without problems in Production?

Happy coding!
---------------
Paul
Sweden

Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

GnanaRaj
Level 3

Yes, I can launch it from process studio and as well as command line.

GnanaRaj
Level 3

Also, the windows application doesn´t throw any error while it crashed.

PvD_SE
Level 12

Hi Gnana

Ok, so the launch works in Production, but as the process comes to the attach action it crashes. While the application doesn't have to throw an error, the BP attach action certainly will, and an exception should show up in the log for that run. If it doesn't show in the log due to too light logging levels, then modify the process to make sure it logs any errors that occur and the errors do show up in the log.

Until we have the actual error, it'll be a guessing game.

Happy coding!
---------------
Paul
Sweden

Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

GnanaRaj
Level 3

Thanks Paul. The desktop app just crashes without any errors. Sorry I couldn´t get any useful info. Still working on it. Let me know if any other options or parameters we should check to attach without crashing the app.

Thanks

GR

PvD_SE
Level 12

Hi Gnana,

To launch and attach to the app, you'd typically have created and object with two pages, one to launch the app, and another page to attach to the app. These pages will have to be called from your process. First the launch page will be called., and the object waits a bit to give the app some time to start up. When the app is launched and active, you'd return to the process and next it will call the attach page in the object. If you step from your process into the attach page and then step the attach stage it should do one of two things:

  • The attach works fine, and you can continue 
  • The attach does not work (you mention your app crashes as a result of the attach) and the attach stage throws an exception

Depending on how you created the attach page on your object it may or may not let the exception bubble up to the process calling the object attach page. But, if you step to the attach page in the object and run the attach stage on that page, it must give an exception.

Questions:

  • What does the attach page and the attach stage in your object look like?
  • What does the call to the attach page in your process look like?
  • How are exceptions from the object handled in your process?

Happy coding!
---------------
Paul
Sweden

Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

GnanaRaj
Level 3

Hi Paul, We launch the app from process through a command. The process access the business object and within it we have this attach before accessing the app. I have pasted the attach process which crashes. There is an exception from attach as the application crashed and that says application not found. Let me know if there is any other information required. 

35681.png
Thx
GR

GnanaRaj
Level 3

Hi Paul, 

I think I found the issue. In the application modeler options I changed three items. First one My application will be already running, then gave the window title and I checked disable invasive technique ( hooking ). Now the app is not crashing. Thanks for all your help.

Regards

GR

PvD_SE
Level 12

Hi Gnana,

Great you got it to work!

Anyway, I'd probably avoid doing any error recovery in the object. That way the exception bubbles up and back to the process and can be seen and handled there. With the recover-resume in your example, all data of the exception gets lost, leaving the process clueless.  

Happy coding!
---------------
Paul
Sweden

Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)