Skip to main content

Automation links

Execution and data links

When building automations in Pega Robot Studio, developers use execution links to sequence the workflow between automation blocks and data links to control the flow of data between automation blocks. Execution links are displayed in gray. Data links are displayed in blue. For example, you use execution links to control the order that steps are performed in and data links to get and set values in applications you are automating and to set a method’s input parameter. 

Data is either pushed when the block on the left is executed or pulled when the block on the right is executed based on the following rules:

  • Data is pushed if the block on the right does not have an execution link connected.
  • Data is pulled if the block on the right does have an execution link connected.

Pega Robot Studio implements an automatic type conversion for straightforward cases; for example, a bool variable used in a text field is displayed as true/false. Even so, it is essential to keep the output data port and the input data port of compatible data types.

In the following image, click the + icons to see an example of execution and data path.

By hovering your cursor over a data port, you can display a tooltip that informs you of the data type for that data port. For example, you are working in an automation and you are unsure what data type a subautomation returns. You hover your cursor over the output data port for that variable in the design block, and the system informs you that the returned value is a String.

Screenshot showing the data type being displayed when hovering mouse over data port

You can hover your cursor over both output and input data ports. When you hover over an input data port, the system displays the data type that the design block requires for that parameter.

Threading

You use two types of threads in Pega Robot Studio:

  • User interface thread
  • Application threads

The user interface thread is responsible for painting the desktop window and displaying Windows Forms. This is the first thread that is created when a project starts, similarly to the main thread. When the user interacts with a Windows Form's control, the user interface thread receives and processes all user activity messages. 

All Windows Forms events are raised synchronously and execute on the user interface thread. 

When Pega Robotic automation Runtime starts an application, the system also creates a monitoring application thread. The application thread identifies the application's controls and raises events in response to user input. The application thread may raise events synchronously or asynchronously.

Automations run on the same threads as the event that triggered them. This approach allows automations to respond to synchronous and asynchronous events and control threading behavior by using asynchronous links.

Because the user thread is responsible for displaying elements on the screen, any long-running activity may give the impression that the user interface is not responding. To avoid this issue, always configure an automation that is triggered by a Windows Forms event to execute an asynchronous link when it interacts with non-Windows Form components.

Synchronous and asynchronous links

Synchronous events are blocking, which means the target application stops the execution until the automation completes the task. When an asynchronous link is encountered during the execution of automation, Pega Robot Studio creates a new thread and executes the following design blocks on the new thread. Asynchronous events are not blocking, which means the target application executes normally after triggering the automation. 

To toggle a link from synchronous to asynchronous, right-click the link, and then select the desired option from the context menu. The appearance of the link appearance changes from a solid to a dashed line. 

Screenshot showing toggling between synchronous and asynchronous automation link

Use asynchronous links when automation is triggered by a button click on a Windows Form. In the following image, a user starts an automated process by clicking the Find a client button on the Windows Form. While a robot logs in to the banking application and performs a search, the user wants to pick a transaction date and add a note to use for further processing.

With synchronous links only, the Windows Form is disabled until a robot finishes the searching task. Changing to the asynchronous link creates a separate thread from the user interface thread. 

Screenshot showing the use of asynchronous automation link when using Windows Form in an automation.
A Windows Form for example asynchronous link

Threading best practices:

  • Most automated applications are designed for user interactions, so an automation designer should simulate user behavior. Avoid interacting with two windows or applications at once.
  • When designing automation, do not use multiple threads when automating a single application and launch applications on-demand rather than all at once.
  • Creating too many asynchronous links in the automation results in too many threads that hinder response time and automation completion.

Data sensitivity property

When executing automations containing sensitive data, such as passwords or identification information, consider using the Sensitive property. For the data links marked as sensitive, the actual data value is not stored as part of any log file, but the text "---Sensitive---" is sent instead.

To mark a data link as sensitive, you set the Sensitive property to True in the properties grid.

Check your knowledge with the following interaction.


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice