OutputConnection: optional, one may specify an output variable (of type TerminalConnection) in order to be used later in other terminal sessions.
How to use terminal connection in another workflow.
i have created a variable in outconnection and passed it to existingconnection of another terminal but its not working, any help on these??
What does the error say and do you have any screenshots? As far as if there is a problem with UiPath passing Terminal session variables as arguments, that I am not sure about. But, if it’s an issue with your code maybe I can help.
If terminal variables indeed can not be passed, then a workaround is to pass the connectionstring as a string. You can pass that by doing terminalVariable.ConnectionString
then a workaround is to pass the connectionstring as a string. You can pass that by doing terminalVariable.ConnectionString
Can you brief on these topic with example if possible.
From the error, it shows that your ConnectionString is empty. Make sure you have set the right properties for your connection. If you are passing terminalVariable.ConnectionString as an Argument to a string variable in your workflow, you will need to place that variable in the ConnectionString property shown in the below screenshot:
At the first terminal session it will creat a connection string then you can create a variable for output connection property in that connection and make use of the variable when ever you are passing the connection.
In my case OutputConnection variable comes null so I can not pass it to other workflows. Do you mean using both output connection variable and connection string together?
Thanks,
@RSalamow yes at first you need to provide connection string and create a variable in output connection property, next where ever u need these connection u can pass this variable to existing connection property.
I establish a connection in Main.xaml, and then i create a variable within OutputConnection. This variable is passed to an argument (another .xaml) where I want to continue the proces within the same terminal session. So the argument is inserted into ExistingConnection.
But when the robot comes to execute the terminal activities, I get the error: Terminal Session: No connection specified
You should be able to pass the TerminalConnection variable as an argument and connect to existing sessions. Make sure you update to latest Terminal activity package first.
Also, ensure that you are using the correct direction for the argument, as that will cause the argument to be null when invoking a workflow or Library. Basically, it should be IN/OUT or OUT where the session is initialized and opened so it can attach to it. It should be IN everywhere else.
Your Login part should check if the TerminalConnection is not null using condition: tc is Nothing
If true, then create session using connection string. If False, then use ExistingConnection property and navigate screens to main menu if wanted.
In the other thread we’re in I’ve posted more screenshots that show all the arguments, variables, etc. We might as well just communicate through that one to save all the back and forth
You have CloseConnection checked in the first Terminal Session activity that outputs the connection to tc. Uncheck that box. Make sure it’s not checked in any of your Terminal Session activities.