cancel
Showing results for 
Search instead for 
Did you mean: 

Best object Design

SamLima
Level 7

I'm wondering why developer course on LMS suggests that there's no need to create an attach action in basic action object or in object that has a launch action 

but in same time they create an attach action in BP Travel basic actions object and actually need it & use it, is it a conflict or what?

33021.png
33022.png
33023.png


------------------------------
Sam Lima
------------------------------
1 BEST ANSWER

Helpful Answers

RushabhDedhia
Level 4
Hey @SamLima

Yes I feel there is a conflict for sure in the LMS & the example where they are suggesting to create a attach
Below are the best practice you can follow in future designs

1) It is suggested to have a Attach action page in all the objects that are interacting with the application
2) Attach action page is called a sub page in pages like Login, Navigate to particular screen Etc.
3) It is suggested not to publish the attach page as it is already called in other action pages
4) Build a Recover-Resume stage or Recover-Exception stage in the attach page which help to recover any exception which is related to attaching to an application.

I hope above points clear the confusion 🙂


------------------------------
Rushabh Dedhia
Senior Consultant - Team Lead
WonderBotz LLC
Ahmedabad
+91 9428860307
------------------------------
Rushabh Dedhia Founder, Biznessology (https://www.linkedin.com/company/biznessology/) +91 9428860307

View answer in original post

4 REPLIES 4

Devendra_KumarP
Level 7
Hi Sam, 

It's better to have Attach action and use in other actions.  Attach action read whether application is connected or not. if not then only it will attach.

------------------------------
Devendra Kumar Prajapati
RPA Manager
Infosys
Chandigarh, India
------------------------------
Devendra Kumar Prajapati RPA Manager Infosys Chandigarh, India

Hi @Devendra_KumarP,

yes sure thing we need attach action in other objects not launched the application,
but my point is that LMS course says no need for attach action in same object that launches the app, but while implementing, I can see that they built attach in every object even though with Basic Actions Object
I mean this is a conflict between what course says and what templates acutally show​

------------------------------
Sam Lima
------------------------------

RushabhDedhia
Level 4
Hey @SamLima

Yes I feel there is a conflict for sure in the LMS & the example where they are suggesting to create a attach
Below are the best practice you can follow in future designs

1) It is suggested to have a Attach action page in all the objects that are interacting with the application
2) Attach action page is called a sub page in pages like Login, Navigate to particular screen Etc.
3) It is suggested not to publish the attach page as it is already called in other action pages
4) Build a Recover-Resume stage or Recover-Exception stage in the attach page which help to recover any exception which is related to attaching to an application.

I hope above points clear the confusion 🙂


------------------------------
Rushabh Dedhia
Senior Consultant - Team Lead
WonderBotz LLC
Ahmedabad
+91 9428860307
------------------------------
Rushabh Dedhia Founder, Biznessology (https://www.linkedin.com/company/biznessology/) +91 9428860307

Hi @SamLima,

As per the LMS course what they have suggested​ makes sense since we always follow a multiple object layer while iterating with any application. So let say when we have an object called as 'Basic Actions' we only go for actions like 'Launch', 'Terminate' and 'Detach'. Here, 'Attach' may not be required as when you will be launching the application, automatically the application will be attached. Usually, when we use other objects for interacting with different screens of the application we go ahead and use attach action of that specific object so that we stay connected all the time.

But this approach we usually don't follow​ in certain cases, the benefit you get with keeping the 'Attach' stage at 'Basic Actions' object level is that you can implement a logic to check the connection status and if not connected you can simply call the attach action. But if there is any error that happens while attaching to the application then you can use the launch action via exception handling. This used to be al older approach that all Blue Prism processes used to follow.

33014.png

The downside of this approach is, you wont be sure that going ahead always your application will be attached in all other objects specific to individual screens. Many times we have seen that application some times get detached halfway the automation and in such cases we cant really use the launch action in the object itself as launch action is only a part of 'Basic Actions' object.  But the plus point is that you can easily call the launch action within your object and you dont need to worry about handling exception at the sub process level.

So the new approach which even the LMS suggests is use the 'Attach' actions only for objects meant for interacting with individual screens. In case any error pops up you throw an exception:

33015.png
And you handle this error at the process level where you can call the 'Launch' action of your 'Basic Actions' object:

33016.png

So here the benefit you get is that you do your overall exception handling at the process level which is actually one of the most important best practices where it is said use objects for throwing exceptions and sub processes for handling the exceptions and just use the basic actions to either launch or terminate the application as and when required. Secondly, in all our actions related to individual screens we ensure that we attach to application as we always call the attach page for such actions at the beginning:

33017.png

So, ideally both approaches are right it just have different uses and depends on which one you want to use. The BP Travel template has been created probably using the old approach most likely while the LMS tells us about the new approach but technically both are correct. The new approach according to me has better benefits which the LMS describes

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.