cancel
Showing results for 
Search instead for 
Did you mean: 

When to attach

JakobSørensen
Level 4
The team I recently joined has a best practice of having 'Attach' as a seperate action on each object and then call that action first, before any other action on the object is used. So in a simple process, it would look like this:

21404.png
However, in a process that uses a lot of different objects, that also means a lot of 'Attach' stages. So my question is whether this is the correct time to call attach, or if you should it somewhere else. For instance:
  • At the beginning of each action
  • In the initialize action (if this is possible)
  • ...somewhere else?
How do you guys do it?

------------------------------
Jakob Sørensen
------------------------------
14 REPLIES 14

jebarson
Level 3

It's better to use attach page in beginning of each actions next to start stage. So it will reduce the use of calling them separately in process each time.

What's the application you are automating ? Is it something like mainframe or Citrix.



------------------------------
Jane Jebarson Senior Automation Engineer
Engineer
Allianz
Europe/London
------------------------------

It's a lot of different systems - but most of them are web based. To keep the objects small, we make an object for each logic part of the website (e.g. the navigation bar). But this also means that each object has to be attached. I would find it more logical if each action started with an Check if already attached? > No? > Attach. So that the 'Attach' part wasn't visible at process level.

------------------------------
Jakob Sørensen
------------------------------

Hello Jakob,
I believe your take on this is correct.
And that is why "Is connected" condition is there.

If you are calling attach before every action it will make the code huge and it will increase your DEV and Testing efforts.

And I think it is a recommended best practice to check for connection before attaching.
Also if there are many objects and you are automating WEB then synchronizing of detach and attach would be a challenge,

------------------------------
------------------------------
Best Regards,
Ved Sengupta
RPA Developer
Deloitte India (Offices of the US)
Bangalore | INDIA
------------------------------
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------

Hi Jakob,

Might I suggest a hybrid approach?  Build the "check attached" piece at the top of your attach page in each object. That way, no matter where it is called from (process or object action page), the check completes first. This will hopefully reduce issues with adopting a new style of development regarding attaching.  

One other note - someone once suggested to me that if you're going to call an object page from a process, you need to publish it (obviously), but then you should avoid calling that page from within the object itself. If you're going to call an object page from another page in that object, you should not publish it.  If you really want to prevent people from using the Attaches all over your process pages, you could also not publish the page.  This way a developer could infer that the attach was built into the object layer and not necessary from the process layer.

I hope this helps, and good luck with the new team!

------------------------------
Diane Sanzone
------------------------------

What I was thinking about doing, was having an attach action (as you mentioned) which first checks and then attaches if necessary, like this:

21377.png
The only downside of this is that you have to remember to call in the beginning of every action. Which is why I wondered if you could get it to run automatically, by putting it in the initialize action.



------------------------------
Jakob Sørensen
------------------------------

Hello Jakob,
If you are having this as initialize action later point of time in code achieving attach would be complex in other places if required.


------------------------------
------------------------------
Best Regards,
Ved Sengupta
RPA Developer
Deloitte India (Offices of the US)
Bangalore | INDIA
------------------------------
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------

It's definitely the best way to go to have an Attach subpage reference inside of each action at the beginning of the action. Every single one of our actions starts with a subpage reference like that. In the subpage, it's the standard Attach page that checks to see if it's already connected or not, and if it's not then it connects/attaches.


------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

That would be an infinite loop if it could not attach because the recover would always catch the attach failure and it would never end.

I think it'd be nice if Blue Prism implemented a way to configure attach to be automatically run in an object. That does seem like a cool idea, but as with most flow-related activities in Blue Prism, it tends to be designed such that we need to specifically an purposefully do something. It causes Blue Prism processes and objects to be filled with tons of stages, but the standard approach works pretty well.

I think it's important for Blue Prism developers to be used to dropping in an Attach subpage reference at the beginning of every action, and a code review checklist can help make sure it gets done before deployment.


------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Hello Dave,
I think this sub page reference idea is already a popular option among us developers.
But in that case also we have to call the sub page at the start of every action and in case if we miss it then there's a chance of failure.

Code review checklist helps a lot here having attach before every action as one of the high priority check point.

------------------------------
------------------------------
Best Regards,
Ved Sengupta
RPA Developer
Deloitte India (Offices of the US)
Bangalore | INDIA
------------------------------
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------