Wait for Process before attaching
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-11-16 06:03 PM
I am currently developing a BO for a process that is "soon to be started". I want Blueprism to wait for the process to be launched.
How I expect to do this:
1) Place a Wait stage
2) Drag the main element (in bold) of the process to the "Element" column.
3) Select either "Wait for Window" or "Wait for process (exe)" to be listed in the condition dropdown.
What actually happens:
The condition dropdown is empty when I drag the main element to the "Element" column and therefore no condition can be waited for.
My question is: How do I wait for a process to run so I can attach to it? I do not want to launch it manually, it will be started as a result of another stage.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-11-16 11:06 PM
Hi Jordi - the conundrum here is that the wait stage (and almost every other) depends on the object being attached, and you can only become attached once the application is running. Here's one solution:Create a page called 'Wait for Attach'Use a navigate to attach in the normal way, but protect the navigate with an exception block and Recover/Resume.If the attach fails, assume that the application has not started yet. After the Resume have a 1 second timeout-wait, then use a calculation to track how many times you have waited in total. If you have waited too long (eg 30 seconds) assume there is a big problem and give up by throwing an exception.If you have not exceeded the maximum wait time, return to the navigate and try to attach again. Eventually, when the application is ready, the attach will succeed and you can carry on.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-11-16 06:05 PM
Thanks for your comment. I found out, however, that the BO ""Utility - Environment"" already has such ""Wait for Application"" action.
Thanks anyway, your solution works as well.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-11-16 08:44 PM
If the program is busy, or needs time, will the 'Wait for Application' action wait for the process to release?
As an example, if iexplore.exe is caught on some heavy javascript, will this action wait for it to release? Is there any equal object for Blue Prism that will wait for itself to wait and clear its memory as well?
