Pass terminal connection in a variable, CloseConnection True
Pass terminal connection in a variable…
I would expect the last Terminal Session activity to throw an error because we already closed the connection in the first Terminal Session activity. But it doesn’t, it actually reopens a new connection using the same connection string from the original connection.
No, I had it set to 3 seconds. The connection doesn’t close. I looked at TerminalConnection.Connected and it was false, but the last Terminal Session still just reopened the terminal window, the main terminal screen appeared, and then closed.
(the point here is I’m writing a “Mainframe Close” custom activity that fits our needs, and noticed this behavior when testing it)
The one thing I found that causes the last Terminal Session activity to fault as it should is to set TerminalConnection to Nothing. But that seems like closing the connection should do that automatically.
The CloseConnection property is ignored if the OutputConnection property is set. We consider that the connection is meant to be used at a later point in the workflow so we do not close it.
If the connection is not meant to be reused, do not set the OutputConnection property.
This is not explicitly documented right now but there is a new version of the terminal activities documentation in the works and it will include an explanation for this behavior.
I understand what you mean. I thought you meant that the connection does not properly close.
I tested now and it looks like the connection closes properly but then reopens a new connection when I try to reuse the variable.
I agree, this is not a desired behavior and I will open a bug.