cancel
Showing results for 
Search instead for 
Did you mean: 

application not connected during wait stage

Nico-Janvan_Bru
Level 3
Can anybody help me? I'm doing the Foundation course of BluePrism.
I encounter a problem with running my BluePrism Objects resulting in a not connected message.
I don't understand why this message is, and how to fix this. I tried everything.
This error occurs during the Wait Stage checking for a window being active.
Before this I do a Attach application if the Application is no longer attached.

What is it that I should do?

I'm using the CentrixDataSolutions application that is provided with the course.
33096.png
Until this point no problems. I managed to Login and display the Home Screen.
The next step would be press on ORDERS button and then select Option 1 for New Orders.
This next step is not happening. I get the error:
Internal : AMI error occurred in Wait Start Stage 'Wait for Attach' on page 'Navigate Orders Menu' - Not Connected

Please help.

Kind Regards,

Nico-Jan van Brug, The Netherlands.

------------------------------
Nico-Jan van Brug
------------------------------
10 REPLIES 10

lookman
Staff
Staff
Hi Nico.

All of your objects should have a check to see if you are attached to the application you are trying to communicate with. Each object should have an Attach page that you call before try moving forward.

The attach page should look like this:
33053.png
When you get to your Input Order page, the first step after the Start should be the Attach. If the application is not attached, it will get attached.
33054.png
Let us know if you are able to get this working.

jack

------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Jack, thanks for your support.

I changed from a call to a Action to call my page "Attach orders" to a Page refering to this page. Now it works fine. 
Before pressing the ORDERS button I already did perform a Attach and checked for is-connected. That went all fine with no errors and I could see the status was realy changed from is-connected = false to is-connected is true. Why is doesn't work to use a action to refer to a page in the same Business Object and it does work using a Page refering to a page in the same Business Object I have realy no clue. Can you please enlighten me in this?

Kind Regard,

Nicop-Jan van Brug.

------------------------------
Nico-Jan van Brug
Senior Projectmanager
ITicon
Steenwijk
+31621484860
------------------------------

Hi Nico.

I'm glad you got over this hurdle.

When developing an object, before you do anything (once you've launched) in another page that is going to interact with the object, you want to confirm you've attached it. Essentially you are ensuring you have the object focused so that any key strokes or mouse clicks you want to execute will actually interact with the application. So if you launch the app and then are working on the object or checking your email, you are no longer attached to it.

Does that make sense Nico?

jack

------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Jack. Thanks for the explanation. 

Here my business objects as screen print. 

33065.png
I'm calling this business object from my main business object: 
33066.png


------------------------------
Nico-Jan van Brug
Senior Projectmanager
ITicon
Steenwijk
+31621484860
------------------------------

33070.png
Hi Jack, here my Navigate Orders Menu. 

As you can see I now use a Page to call my Attach Orders Page. Before this I used a Action to do this. The result form Attach Orders was the same: the application was connected. So why did I get a not connected while pressing the ORDERS button and worked it without any problems using a Page Reference in stead of a Action?

33071.png


------------------------------
Nico-Jan van Brug
Senior Projectmanager
ITicon
Steenwijk
+31621484860
------------------------------

Hi Nico.

I want to clarify my understanding. When it was not working, you said you used an action for Attach whereas you are now using the page to Attach. Is that correct?

In other words, you had an action stage that used the Centrix Data Solutions - Order Processing object and used its "Attach Orders" action?


jack

------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Hi Jack,

Your understanding: "When it was not working, you said you used an action for Attach whereas you are now using the page to Attach. Is that correct?" is correct. I was using a Action to call my Attach Page. After this I got the not connected trying to press a button. After I change using a Page to call my attach page, this problem was solved. 

My question now to you: Wy does it work with a Page Reference and not with a Action?


------------------------------
Nico-Jan van Brug
Senior Projectmanager
ITicon
Steenwijk
+31621484860
------------------------------

Hi Nico.

Okay. Now that I understand clearly what is gong on, I believe I can provide the answer you seek.

When you use the action stage to invoke the Centrix Data Solutions - Order Processing Attach page from the Centrix Data Solutions - Order Processing object, you are actually instantiating another instance of the Centrix Data Solutions - Order Processing object which attaches to the application. However, this is a separate instance so the original instance of Centrix Data Solutions - Order Processing is NOT connected to the application and therefore it fails.

This is one of the reasons why BP best practices state "Do not call published actions from within an object".

I realize the explanation is a bit convoluted because of the recursive nature of the issue so if it is not clear, let me know and I'll try explaining it in a different way.

jack


------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

Thanks Jack,
It was really helpful for me because I got stuck and instantly got your solution.



------------------------------
Sajid Sayyed
------------------------------