cancel
Showing results for 
Search instead for 
Did you mean: 

#BPTechTips #TipOfTheDay - Wise use of Block Stage in Blue Prism

#BPTechTips #TipOfTheDay - Wise use of Block Stage in Blue Prism

Block Stage:

31416.png

👉The block stage is an invaluable part of Exception Handling in Blue Prism automation which is available in process studio and object studio.

👉It serves the purpose of isolating the origin of exceptions. Essentially, a block acts as a designated area within your studio, functioning as a container for handling exceptions related to your logical modules of action or process.

👉When used appropriately in conjunction with the Recover and Resume stages, the block stage can effectively prevent infinite loop scenarios.

👉Block stage can be utilized to assign a name to your logic, ensuring clarity for code reviewers and other developers regarding its purpose and usage.

👉Another valuable use of blocks is to segregate data items within your object or process. With this, you can clearly define and delineate the scope of each data item. This practice greatly helps code readers and other developers in easily interpreting the purpose and usage of individual data items within your automation.

31417.png

👉To draw a parallel in real-life terms-

Visualize a scenario where all your logics are children engaged in playful activities within a park, and you are a PT teacher responsible for their supervision. In this context, a block stage can be compared to a boundary line or a container. Its purpose is to enable each child to exclusively exit through a predetermined and specific exit gate that leads back to the school, and that too for a particular reason.

Even in the event of a rebellion among the children, you maintain complete control over the exit gate of the park. The boundary line ensures that the kids do not exit randomly from the park and use the only exit gate.

Same as this gives you full control of the children, the block stage allows similar control in the automation.

👉What can you do with a block stage?

1.    Name the block stage and you can add a description as well
2.    Modify the color of the block stage
3.    Adjust the size of the block stage

31418.png

👉Things to keep in mind while using Block stages:

1.    Overlapping blocks are not allowed
2.    Maintain a gap between blocks
3.    Nested blocks are not allowed

31419.png

Blue Prism Error panel will show you the errors for the incorrect use of the block stage.

31421.png

👉Find more on Block Stage here

👉Read more about exception handling in Blue Prism here

💡Curious to know how you use Block stage in your day-to-day Blue Prism automation developments. Are there any other use cases of the Block stage?

🤗Feel free to add more insights to this #BPTechTips.

#BPTechTips #TipOfTheDay

------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------

1 REPLY 1

PvD_SE
Level 12

Very nice, thanks!

Additionally, I tend to put loops in a block if I can. Depending on the actions between a loop-start and a loop-end, the loop can easily become confusing. The block makes it easier to keep the overview.



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

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