Wait for Terminal Value

Waits for values set at the command prompt on the connected terminal.

Command availability: IBM RPA SaaS and IBM RPA on premises

Script syntax

IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

terminalWaitFor --patterns(String) [--interval(TimeSpan)] [--timeout(TimeSpan)] (Boolean)=value

Dependencies

Use one of the following commands to connect to a Terminal:

Input parameters

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Values patterns Required Text Connected terminal values that can be displayed at the command prompt.
Interval interval Optional Time Span, Number, Text Defines the time interval at which the command reevaluates the terminal command prompt to verify that the value has been set.
Timeout timeout Optional Time Span, Number, Text Maximum wait time for set values to be displayed at the terminal command prompt.

Remember:If no value is defined for the Timeout parameter, the bot uses the context timeout defined by the Set Timeout (setTimeout) command. If that command is not used on the script, the default timeout is 5 seconds.

Output parameters

Designer mode label Script mode name Accepted variable types Description
Success value Boolean Returns True if the set values are displayed at the command prompt of the connected terminal, or False if they are not.

Example

After connecting to a 3270 terminal, the Wait for Terminal Value command is used to wait for the "Mainframe Operating System" value to be displayed at the command prompt.

defVar --name terminalConnection --type Boolean
defVar --name valueSuccess --type Boolean
terminalConnect --name terminal --hostname "example.com" --port 23 --timeout 00:00:01 terminalConnection=value
terminalWaitFor --patterns "Example.com" --interval 00:00:01 --timeout 00:05:00 valueSuccess=value
terminalDisconnect --name terminal
logMessage --message "Found Value: ${valueSuccess}" --type "Info"
// Result: Found Value: `True`
Remember:Use a valid connection to connect to the server.