Reader small image

You're reading from  Robotic Process Automation with Blue Prism Quick Start Guide

Product typeBook
Published inNov 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789610444
Edition1st Edition
Languages
Right arrow
Author (1)
Lim Mei Ying
Lim Mei Ying
author image
Lim Mei Ying

Lim Mei Ying has extensive experience in designing, implementing and supporting Blue Prism processes as well as setting up a Robotic Operating Model for the enterprise. She has spent many hours figuring out the dos and don'ts of Blue Prism technologies and thrives on the challenge of finding new ways to solve automation problems. Mei Ying lives on the sunny island of Singapore.
Read more about Lim Mei Ying

Right arrow

Actions, Decisions, Choices, and Calculations

In this chapter, we will continue to build up the purchasing process. While we are at it, we will explore the remaining stages in the toolbox, namely the following:

  • Actions: Behaves as the arms of the robot. It will do things such as click on buttons or press the keyboard.
  • Decisions: Enables the robot to choose which path to take based on a given algorithm.
  • Choices: Helps the robot through a series of decisions.
  • Calculations: Builds formulas and expressions to determine the value of something

These are the stages where we are able to teach the robot to think somewhat. These stages are absolutely critical when building any process. Without them, we won't be able to build meaningful processes at all.

Actions

Blue Prism ships with a ready-to-use set of libraries that integrate with a myriad of applications and common functions that greatly speed up development time. There are two types of libraries: Internal business objects, and visual business objects.

Internal business objects are at the core of Blue Prism. They are built within the Blue Prism application. Some of the commonly used internal business objects are as follows:

  • Collections: Adds rows, copies rows, counts columns, counts rows, removes all rows, and removes a single row
  • Calendar: Provides actions for getting working days and public holidays from the internally maintained Blue Prism calendar
  • Work Queues: Various actions for work queues that we will discuss later in the book.
  • Credentials: Getting and setting passwords stored within Blue Prism. Used by the robot to access various applications.

Visual business objects...

Decisions

As we plot the workflow on the canvas, there are times when we need the robot to make a decision. Within the decision, there is always a question. Unlike the open-ended questions that confound philosophers, the kind of questions that our robots deal with always result in a Yes or No answer.

For example, is the weather hot? If yes, eat some ice-cream. Otherwise (no, it's cold), drink hot chocolate. In the world of programming, a decision stage models an if-else statement.

In a typical workflow diagram, we draw this out using a decision diamond as shown here:

Adding a decision to decide whether to proceed to purchase the items

Let's add decision logic to our purchasing process. After counting the number...

Choices

A choice stage is very similar to a decision. Previously, we saw that a decision asks a single question, for example: Is the weather hot? It always results in a yes-no type of answer. A choice is made up of multiple decisions which gives us the ability to program for more than one decision point. We can use it to create a more complicated scenario, such as the following:

  • If the temperature is ≥ 30 °C, we will eat ice cream
  • If the temperature is < 30 °C and ≥ 25 °C, we will drink cooled water
  • Otherwise, if the temperature is < 25°C, we will drink hot chocolate

In a flowchart diagram, the preceding logic will appear as shown in the following diagram. Note that it is made up of many decision diamonds:

Using a choice to determine the email...

Calculations

We had a sneak peek into calculations when we were exploring choices. Let's take a more in-depth look at it in this section. We are familiar with mathematical calculations, like the following example that we saw when we studied data items:

X = 10

Y = 8

Z = X + Y

What is the value of Z? While we can manually whip out a calculator and compute that Z = 10 + 8 = 18, robots use the calculation stage to apply these formulas to get the answer:

We can do a lot more than calculate numbers. In the next example, we will use the Calculate stage to prepare an email message for the requester of the item to let him know that the item has been added to the cart.

Calculating the email notification message

Follow these steps...

Multi calc

The multi calc stage works in the same way as the calculation stage, except that it can store multiple calculations. If you look at the properties dialog of a multi calc, you can see a table that lists all the calculations to be performed.

In the following screenshot, we have two calculations in the list:

  • A + B = C
  • C + D = E

The robot will work through the first expression, and then the second expression. You can use the Move Up and Move Down buttons to change the order in which the lines are processed:

We could have split the stage into two single calculation stages and it would have worked the same way. However, if you have a set of complex calculation steps, putting them all into a multi calc will simplify the representation of the stage. You can perform the same number of calculations and take up only a fraction of the screen space.

...

Summary

In this chapter, we have completed the first draft of the purchasing process. In doing so, we used stages that are key building blocks of any process. We first learned how to use the built-in business objects within Blue Prism to perform actions, such as counting the number of rows in a collection. Next, we used the decision stage to teach the robot how to make small decisions that will always result in a yes-no answer. For more complicated decisions, such as matching the name to the email address of a person, we used the choices stage. Finally, we gave calculations a spin and used it to generate the email message that we will send back to the requester.

While it is cool to have ready-to-use business objects at our disposal, nothing beats having the flexibility to build your own and extend the functionality that Blue Prism provides out of the box. We will look at implementing...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Robotic Process Automation with Blue Prism Quick Start Guide
Published in: Nov 2018Publisher: PacktISBN-13: 9781789610444
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Lim Mei Ying

Lim Mei Ying has extensive experience in designing, implementing and supporting Blue Prism processes as well as setting up a Robotic Operating Model for the enterprise. She has spent many hours figuring out the dos and don'ts of Blue Prism technologies and thrives on the challenge of finding new ways to solve automation problems. Mei Ying lives on the sunny island of Singapore.
Read more about Lim Mei Ying