Disconnect from Session

The Disconnect from Session building block disconnects from a terminal session by disconnecting from the API. It does not close the terminal session itself. When you reconnect later, you are taken back to the last green screen page, so it is often best to disconnect from the terminal application’s “home screen” to reduce the risk of the flow failing on reconnect. To automate closing a terminal session, use desktop (rather than green screen) building blocks.

Fully expanded, the Disconnect from Session block shows the following properties:

image-20260207-121053.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Disconnect from Session onto the canvas.

  2. Connect the block in the flow. Optionally, adjust other parameters if needed.

  3. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector triggers the block to disconnect from the terminal session. The green output connector triggers when the terminal session has been successfully disconnected. You can rename the block title by double-clicking it and typing a new title.

  • Error occurred: Triggers if Disconnect from Session returns an error during execution, so you can branch your flow.

  • Default timeout: If the checkbox is not selected, the timeout is 10 seconds (unless changed manually). If the checkbox is selected, the flow’s Default timeout under Max. run time applies.

  • Timeout: The maximum time spent disconnecting from the terminal session before giving up. If Default timeout is not selected, this value is used (default is 10 seconds unless changed manually).

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.