Terminal Connection always closing

Hi everybody,

I’ve read tons of threads with similar problems but none of them brought me close to a solution.

Everything works fine with Ui.Path.Terminal.Activities 2.6.0 but despite I’ve unchecked Close Connection and have also no Output Connection, the Connection always closes.

So, everytime I want to test some steps, I have to login and run through all previous steps.

What could be the reason or how can I find a solution?

THX

Thomas

@thomas.wenth

Welcome to forums

Are you getting any error? If so you can paste the error

Thanks,
Srini

Could you please check with below steps-

  1. Verify that the “Close Connection” option is unchecked: Double-check your workflow and ensure that the “Close Connection” option is indeed unchecked in the Terminal session activity. If this option is checked, it will automatically close the connection after the activity is executed

  2. Verify that no Output Connection is configured: Ensure that you do not have any Output Connection configured in your Terminal session activity. If an Output Connection is configured

That’s the problem. You have to output the connection to a variable, and then in later Terminal Session activities use that as the connection input.

Thank you for your answer and welcome.

No error, no hint in the logs

Hi Nitya,

I made a minimum workflow, just open the Terminal and send some keys.

  1. unchecked
  2. no output connection

No, I don’t want to set the output connection, because it closes the terminal.

I made a complete sequence of workflows with output connections and everything works fine.

Maybe it’s easier to understand, if I describe my target: I want to develop some complex routines to automate a complex task. Therefore I want to test snippets beginning at some certain point in the terminal without going through all the login, menu and preceding steps.

It’s like the behavior in the browser, where you can use an open session and try the next steps without going through all the preceding steps.

That’s the reason why output connection doesn’t work in this case and as far as I have seen in my log, the output connection is the same connection string as the parent session.

No it doesn’t. The output connection is so that you can store the connection in a variable and then later use it as the input to another Terminal Session activity.

You can’t. This is one of the annoyances of mainframe automation. You have to repeat the initial steps to get back to the point you want. Of course this is also true of any app or web app - you still have to open it and log in and browse through screens to get back to where you were to test a certain set of steps in the middle.

Then I don’t understand this entry in the manual of Terminal: CloseConnection - If this check box is selected, the existing connection is closed after the activity stops execution. By default, this check box is selected. Please note that this property is ignored if the OutputConnectionproperty is set.

For web app there is the option NAppOpenMode.IfNotOpen, so I guess you don’t have to browse through all steps - at least in my Studio.

Nevertheless thank you for your effort

It means that if you have the Output Connection property filled in with a variable, the Close Connection box is ignored - so it won’t close the connection even if that box is checked.

Connections are always closed when the Job stops. I think that’s what you’re seeing, and there is no way around this. You can’t keep a connection open - and reuse it - between Jobs.

But that still doesn’t maintain the attach from one Job to the next. With a web app you can attach to an existing window vs opening a new window. With Terminal Session you can’t, there is no such “attach” concept.

1 Like

Thank you for your time and patience!

1 Like