Execution links and data links
Automations use execution links and data links to create the business logic for executing Pega Robot Studio projects.
Use automations to create business logic and establish data and execution paths between
and within integrated applications. The following figure shows an example of an
execution and a data link:
Execution links trigger properties, methods, and events to pull or push data (for properties) and execute functionality (methods and events). Create an execution link by clicking and dragging from an output execution port (gray circle) to an input event port. The execution link between the objects displays in gray, the same color as the execution port. You can also click and drag from an execution port to a blank space on the Automation Surface to open the Quick Add dialog box and select a new control.
The execution links on an automation can occur synchronously (the default) or asynchronously. How you design execution paths and the choice of using synchronous or asynchronous links depends on how you need to manage threading.
Asynchronous links are an easy way to launch a new thread within an automation. Asynchronous links are represented in automations as dashed lines. When an asynchronous link is encountered during the execution of an automation, Studio creates a new thread and executes the automation design blocks after the asynchronous link on the new thread. The existing thread finishes as soon as the asynchronous link is encountered, releasing any resources.
Links default to Synchronous. To toggle a link from synchronous to asynchronous, right-click the execution path link and select the Asynchronous option. The link’s appearance changes from a solid line to a dashed line.
Asynchronous links are particularly useful in the following situations:
- Releasing Windows forms event threads
- Releasing synchronous adapter event threads
- Launching simultaneous activities
A design best practice for event links is to terminate all branched event paths. Anytime the event path in your automation branches, make sure that all event paths terminate logically.
Data links are links that transfer data between properties, methods, and components. Create a data link by clicking and dragging from an output data port to an input data port. The data link between the objects displays in blue. The data is not sent unless the components are properly triggered to either pull or push data.
Note that when creating data links, the output data port and the input data port must be of compatible data types. For example, the ListBox Items output data is a collection type. and the input data type of a text box is a string.
Click on either an event or data link to display the link properties in the Property
grid, as shown in the following figure:
The following table describes the properties available for links:
Properties for links
Property | Description |
Name | Shows the name of the link, such as automationLink3. |
Asynchronous | Set to True to make the event link asynchronous. Asynchronous links are executed on a separate thread. Control returns to the calling thread immediately. The default is False, which makes the event link synchronous. |
FullName | Shows the fully-qualified name of the link. |
Sensitive | This property applies to data links. Set to True if the link exposes sensitive data. The default is False. If set to True, the term "Sensitive" is logged instead of the data. |
UniqueId | Shows the fully-qualified identity of the link. |
LogAfterExecution | Sets text to be written to the log after the link executes. |
LogBeforeExecution | Sets text to be written to the log before the link executes. |
Previous topic Linking design blocks Next topic Types of design blocks