UiPath Studio - Workflow Design


Advertisements

It is essential for Robotic process automation (RPA) products to give their users an amazing experience. One way to do this is to make visual workflow automation straightforward and intuitive. UiPath is providing automated workflow design which can be used without programming knowledge.

Layout Diagrams

We can integrate activities into workflow design while developing a workflow file using Layout diagram. UiPath basically provides us the following three layout diagrams with the help of which we can integrate activities into workflow design −

Flowchart

A flowchart is a graphical representation of a process in which each step is represented by different symbols connected with arrows

Flowchart is one of the best among the three layout diagrams of UiPath workflow because it is flexible and tend to lay out a workflow in two-dimensional manner. They can showcase decision points within a process very efficiently owing to their visual appeal.

Sequence

Mostly used layout diagram in UiPath workflow design is sequence. A sequence is a simple linear representation that generally flows from top to bottom, and tells the order in which commands are to be executed.

Sequences are best in simple scenarios when activities pursue each other. The most important thing about sequence is that they are very simple and easy to understand. Recall that We have performed the project of greeting by name in the previous chapter by using sequence as activity.

State Machine

State machine is a complex structure that stores the status of something at a given point of time. It can be finite or infinite in nature. State machine are represented by using state diagrams or in other words they are flowcharts with conditional arrows called transitions. Structures like state machines are best suited for a standard high-level process diagram of transactional business process templates.

Type of Decision

Decision, the action or process of deciding something, is another very important part of workflow design. It is the decision that enables the Robot to react differently in various conditions in data processing and application interaction. Visual structure and readability of a workflow are very important and type of decision chosen would have a big impact on the same.

The followings are types of decisions we can implement in a workflow −

If Activity

This is the most simple type of decision which can be understood whether you have knowledge of programming or not. Related with real life situations, the if activity has one statement and two conditions namely Then and Else. The “Then” condition would be executed if the statement is true; otherwise the Else condition would be executed.

In UiPath workflow you can search 'if' activity from activity panel and add it by drag & drop. Basically the 'if' activity splits a sequence vertically and best suited for short linear branches. Following screen shot will give an insight about 'if' activity −

Process of Deciding

Switch Activity

As the name suggests, the switch activity based on the value of a specified expression enables us to select one choice among the given many multiple choices. We can use switch activity with the 'if' operator to streamline and compact an 'if' cascade with various conditions and activities per branch.

It is also useful to categorize data according to a custom number of cases. For example, we can use switch case to store data into multiple excel sheets.

You can search for switch activity from activity panel and drag & drop to the workflow design. The following screenshot will give you an insight of it −

Switch Activity

The Switch activity, by default, uses an integer argument; we can also change it to Boolean, Object, String etc. from the Properties panel under TypeArgument list as shown in following screenshot −

Switch Activity TypeArgument

Flow Decision

Flow decision or simply decision is an activity that executes one of the two branches, by default named TRUE or FALSE. The execution will depend upon whether the specified condition is met or not. We can change the names of the branches in the Properties panel.

Flow decision is basically equivalent to the If activity and can only be used in a Flowchart. We can search flow decision from activity panel and use it in flowchart by drag & drop. The following screenshot gives an insight about flow decision.

You can notice, in black highlighted square, from the screenshot that flow decision is under the activity panel and have two branches namely TRUE and FALSE whose title can be changed from the properties panel.

Flow Decision

Flow Switch

Flow switch is an activity that splits the control flow into three or more branches. Among them, only one will be executed and the execution will depend upon whether the specified condition is met or not. We can connect more than 12 cases by starting more connections from the same switch node and the connected activities are automatically numbered where the first one would be the default case.

We can change the names of cases from property panel. The following screenshot gives an insight about flow switch activity −

Flow Switch

Naming Conventions

While working in UiPath, we must have to assign names to workflow files, activities, arguments and variables. The names we provide must be meaningful so that their usage can be accurately describe the project and the tasks involved.

To give meaningful names, UiPath provides us the following naming convention which is recommended to follows −

  • Variables names must be in upper CamelCase. Example: FirstName, LastName etc.

  • Arguments should also be in upper CamelCase along with the prefix showing the type of argument. Example: in_FileName, out_FileName, io_DivideByZero etc.

  • The names of the activities must reflect the action taken. For example, click the Delete button.

  • The workflow name should have the verb that describes the working of the workflow. Example: TakeScreenshot, ProcessTranslation.

Proper naming of activities, variables as well arguments reduce the effort to read and understand the project.

Advertisements