Sub Activity – Control

Control manages the flow of execution within automation workflows, utilizing activities like loops, conditional statements, and delays to direct the process.

The Control category has the following sub activities:

Assign: This activity can be used to assign a value to a variable.

Input Properties:

  • To: Specifies the variable to which the value is added or assigned.
  • Value: The value to assign to the specified variable.

Break: This activity can be used to exit from the current iteration if the condition given in the loop is true and it will proceed to the next activity in the workflow.

Comment: This activity can be used to add a specific comment to the workflow.

Input Properties:

  • Comments: The text to display as a comment, entered as a string.

Continue: This activity can be used to skip the current iteration and continue to the next iteration if the condition given in the loop is true.

Decision: This activity controls the flow of a workflow by specifying a single condition that will be evaluated as true or false. The set of activities within the decision activity will only execute If the condition is true.

Input Properties:

  • Condition: Contains boolean expression which returns either true or false.

Decision Switch: This activity controls the flow of a workflow by specifying multiple conditions that will be evaluated to true or false. Depending on the condition that is true, the set of activities under that particular condition will execute.

Input Properties:

  • Expression: contains boolean expression which returns either true or false and used to control the flow of execution of sequence based on certain condition.

Delay: This activity suspends the execution of the next activity in the workflow for the specified period.

Input Properties:

  • Duration: The time, in milliseconds, for which the delay is to be executed.

Execute Code: This activity can be used to execute a specific code in a script format.

Input Properties:

  • Script: The code to be executed as a string.
  • Parameters: Input or Output parameters to be passed between the script and robot.

ForEach: This activity is used to iterate through every element of a collection to perform a series of actions for each item.

Input Properties:

  • Collection: Enables stepping through arrays, lists, data tables, or other types of collections to iterate through the data and process each piece of information individually.

Output Properties:

  • Item: An object variable where the result is stored.
  • Index: Zero based Index of the item in the collection.

Loop: This activity is used to perform iterations and execute a series of activities while the given condition is true.

Input Properties:

  • Condition: Contains Boolean expression which returns either true or false.

Output Properties:

  • Index: Zero based Index of the item in the collection.

Multiple Assign: This enables the user to assign values to multiple variables simultaneously.

Input Properties:

  • Assignments: Assign values to a multiple variable.

Rethrow: This activity is commonly used within the On-Error block to re-throw the exception message that was previously captured by the studio.

Retries the Sequence: This activity is used to retry the sequence when an error occurs during the execution of a normal set of activities.

Options Properties:

  • NumberOfRetries: The number of times to retry the sequence.
  • RetyInterval: Specify the time between each retry.
  • Rethrow: Select the checkbox if you want to throw an error, else uncheck.

Terminate Job: This activity stops the automation intentionally.

Input Properties:

  • Reason: A string that describes the reason for terminating the job.

Throw Error: This activity is used to throw custom exception messages during the execution.

Input Properties:

  • Message: Specify the text to be displayed in exception block.
  • Error Type: Choose the type of error.

Sub Activity – Assertion

These are used for validation and verification steps within the workflow.

The Assertion category has the following sub activities:

Assert False: This activity is used to throw an error message if the given condition is true.

Input Properties:

  • Condition: A Boolean expression that evaluates to either True or False.
  • Error Message: Specify the text to be displayed if the value is True.

Assert True: This activity is used to throw an error message if the given condition is false.

Input Properties:

  • Condition: A Boolean expression that evaluates to either True or False.
  • Error Message: Specify the text to be displayed if the value is False. 

Sub Activity – Printer

The Printer in the System category contains activities related to managing and interacting with printers. It allows automation processes to handle printing tasks, configure printer settings, and manage print jobs efficiently.

The Printer category has the following sub activities:

Get Default Printer: This activity returns the name of the system default printer.

Output Properties:

  • PrinterName: The name of the default printer.

Set Default Printer: This activity sets a default printer for the system.

Input Properties:

  • PrinterName: The name of the printer to set as default.

Demo Project using PowerShell Activity

The URL of the demo project is given below where users can learn about these activities in a better manner. 

Steps:

  1. Create a New Text File on the Desktop. 
  2. Use the PowerShell activity to run the powershell command for retrieving the Name and CreationTime of the newly created text file. The retrieved information (Name and CreationTime) will be written into another text file. 
  3. Execute the PowerShell activity again to run the command for fetching the list of all the services that are currently running or stopped in the system. The details of the services list will be written into a text file. 
Activities Used“Execute PowerShell”
Video Link https://www.youtube.com/watch?v=slX1COWZQNA&list=PLwFA5laAhcEJ7sVztHRNXDdXffy2odMvv&index=29

Sub Activity – PowerShell

The PowerShell in the “System” category contains activities that enable the execution of PowerShell scripts within the automation process. These activities help in performing advanced system administration tasks, executing commands, and automating configurations.

The PowerShell category has the following sub activities:

Execute PowerShell: This activity is used to execute PowerShell commands with specified parameters. 

Input Properties:

  • IsScript: Indicates whether the command is a script.
  • ApartmentState: Defines the apartment state, indicating whether the thread will execute in a single-threaded or multi-threaded apartment.
  • CommandText: The PowerShell command to be executed.
  • Parameters: A collection of parameters for the PowerShell command.
  • PowerShellVariables: Variables to be passed to the PowerShell script.
  • Input: Input values for the PowerShell script.

Output Properties:

  • Output: The result of the executed script.

Sub Activity – Lock

The Lock contains activities related to system security and access control. It enables automation to lock the system, manage user sessions, and ensure secure execution of workflows.

The Lock activity has the following sub activities:

Lock: Other instances of the process are prevented from continuing until the lock is released.

Input Properties:

  • Key: A unique mutex key. The Unlock activity uses this kay to release the lock.

Lock Attempts:

  • Attempts Interval: The amount of time required after a failed lock attempt before another lock attempt is allowed.

Unlock: This activity is used to release the lock that was previously placed by the Lock activity.

Input Properties:

  • Key: A unique mutex key. The Unlock activity uses this key to release the lock.

Sub Activity – Image

Image includes activities for saving and loading images, allowing automation to capture screen images, store them, or load them for further analysis, comparison, or interaction with UI elements.

The Image activity has the following sub activities:

Load Image: This Loads image from a specified location.

Input Properties:

  • FilePath– Specify the full path of the image file, including the image name.

Output Properties:

  • Image– The image variable that stores the loaded image.

Save Image: Saves the image to a specified location.

Input Properties:

  • Image: An image variable in which the specified image is stored. Or An image variable in which a specified image is saved.
  • FilePath: Specify the full path where the image will be saved, including the file name.

Demo Project using File Activities (Part 3)

The URL of the demo project is given below where users can learn about these activities in a better manner. 

Steps:

  1. Write a new line to a text file using the Write Text File activity. 
  2. Use the Read Text File activity to read the content of the same file. 
  3. Display file content in a Message Box. 
  4. check whether the path of a file exists using Path Exists activity. If yes, it should delete that particular file using the delete file activity. 
Activities Used“Write Text File, Read Text File, Message Box, Path Exists, Decision, Delete Files”
Video Link https://www.youtube.com/watch?v=scdpzt0oSAA&list=PLwFA5laAhcEJ7sVztHRNXDdXffy2odMvv&index=26

Demo Project using File Activities (Part 2)

The URL of the demo project is given below where users can learn about these activities in a better manner. 

Steps:

  1. Use the Get File Info activity to get detailed information of a file. (e.g., file creation time, file extension). 
  2. Use the message box. Activity to display the information retrieved from the Get File Info activity such as the creation time and extension. 
  3. Use the Get Files activity to retrieve the location of files in a specific folder. The path of the folder can be provided as input to this activity. 
  4. Store Folder Contents in an Array List. 
  5. Loop Through the Array List and display the location of each file in a message box. 
Activities Used“Get File Info, Get File, For Each, Message Box”
Video Link https://www.youtube.com/watch?v=hY1GGYp-lZY&list=PLwFA5laAhcEJ7sVztHRNXDdXffy2odMvv&index=25