UiPath Studio Guide

Sequences

Sequences are the smallest type of project. They are suitable to linear processes as they enable you to go from one activity to another seamlessly, and act as a single block activity.

One of the key features of sequences is that they can be reused time and again, as a standalone automation or as part of a state machine or flowchart.

For example, you can create a sequence to take information from a .pdf file and add it to a spreadsheet, and reuse it in a different setting, while changing just a few properties.

Note:

Sequences do not use connectors.

Example of a Sequence

To create a sequence that asks the user for his first and last name, and his hair color, and then displays his answers, do the following:

  1. Create a blank project and, on the Design tab, in the File group, select New > Sequence. The New Diagram window is displayed.

Note:

You can also add a Sequence activity to the Designer panel to create a new sequence.

  1. In the Name field type a name for the automation, such as "First Sequence," and click Create. The Designer panel is updated accordingly.
  2. Create three String variables such as strFirstName, strLastName, and strHairColor, so that you can store data from the user in them. Leave the Default field empty, to indicate that there is no default value.
  1. Drag three Input Dialog activities to the Designer panel, one under the other.
  2. Select the first Input Dialog and, in the Properties panel, add a Label asking for the first name of the user, and a custom Title.
  3. In the Result field add the strFirstName variable. This indicates that this variable is going to be updated with the value added by the user at this point.
  4. Repeat steps 6 - 7 for the second and third Input Dialog activities to ask the user for his last name and hair color, and store them in the strLastName and strHairColor variables.
  5. Add a Message Box activity under the third Input Dialog.
  6. Select the Message Box and, in the Properties panel, in the Text field, add the variables and a string to enable you to display all information gathered from the user, such as:
    strFirstName + " " + strLastName + " has " + strHairColor + " hair."

Note:

Remember to add spaces between variables and within strings for an optimal output.

The final project should look as in the following screenshot.

  1. On the Design tab, in the File group, click Run. The automation is executed. The final output message should look as in the following screenshot.

Sequences