Determining if Robot Runtime is running on a Citrix server
If a connection to a Citrix server times out due to session inactivity, the Robot Runtime client does not receive any notification. To address this issue, use the IsContextConnected static method.
The IsContextConnected method takes the context name as an argument and returns a Boolean value that indicate whether the context is connected. The context name is case insensitive. There is a 10-second timeout interval before the methods returns a False value, to indicate that there is no longer a connection.
Adding the IsContextConnected method to the Robot Studio toolbox
- In Robot Studio, open the Runtime tab in the Toolbox window.
- Right-click in the Runtime tab and select Choose Items.
- In the Add Toolbox Items dialog, click the Pega Robot Static Members tab.
- Click Browse and then select the OpenSpan.Runtime.Core.dll file in the Pega Robot Studio program folder.
- Expand the RuntimeHost tree view node and select the IsContextConnected check box.
- Click OK to save your changes.
The following is an example:
When using this static method within an automation, you must add the Citrix Context name in the connection block property.