Terminal Open Session Not Working

Hi James,

As per our last discussion over Terminal/Mainframe Automation as mentioned in below link -

I have tried following the steps mentioned in Issue 5 where ‘SessionA’ was replaced by ‘A’,
still i am getting the error shown in screenshot attached.
Please help over the above issue.

Thanks,
Pravesh

Hello Pravesh,

Let’s try something else.
Please set the ```SessionName input parameter to “Session A”.
Be also sure to include a CloseSession action at the end of your Robin file.
TerminalEmulation.CloseSession Session: TerminalSession


James Papadimitriou
Robin Technical Evangelist

Hi James,
Have tried the resolution but still no success.
Attaching screenshot for reference.
Thanks,
Pravesh

The .CloseSession action should be the last one in the script.
It terminates the session.

I haven’t tried the OpenSession with Bluezone but there shouldn’t be any difference.
Generally, since the final changes, the Session name should be a plain, ‘A’ etc.

Are you sure that the emulator is up and running?

Best regards,
J.


James Papadimitriou
Technical Evangelist

Yes James. The Emulator is Up and Running manually.

Could you try launching both Robin editor and the emulator with admin rights?

Best regards,
James


James Papadimitriou
Technical Evangelist

Hi James,
Have tried Launching Robin Editor and Running the Script shared before but still the issue persists.
Also i am not sure how to launch emulator with Admin Rights as Run As Admin option isn’t available.
Can you please do a small POC from your end for Blue Zone terminal Actions as i have already convinced my firm’s leaders regarding the usage of Robin and its advantage over other RPA tools available in the market.
I need to give a small demo with Major Actions frequently used to the Leadership team and Teminal/Mainframe Automation is one of them.
Thus request you to fasten your support in the same.
If you are comfortable with the Web Ex session to validate the issue , i m good to go.

Thanks,
Pravesh


Removed phone number.
Note from moderation team: Please avoid posting personal information, such as phone numbers online.
This is an online, fully public, community forum.
Such info can be utilized by scammers.

Hi Pravesh, if it’s worth a try, you could try to change the properties of the various “Robin.BridgeToHLLAPI*.exe” programs in the Robin folder to run as Adminstrator.
You lose just a few minutes if it doesn’t work. It seems to me this should (at least) launch the emulator with Admin rights, although I imagine it could cause UAC problems. I don’t have any mainframes to connect to for this, so i can’t test it.

Regards,
burque505

Capture

Hi Burque,

I changing the properties of all “Robin.BridgeToHLLAPI*.exe” in going in the security section of Properties and giving Full Controls to Users Section but still no success.
Can you please guide if the changes done by me are correct?
I am also attaching the screenshot for reference.

Thanks,
Pravesh

1 Like

Hi Pravesh, sorry, I meant to include this screenshot before and failed to. Here’s what I had in mind:

I’m the only user on my machine, but you could try “Change settings for all users” also.

Regards,
burque505

Hello @Pravesh2891.

  • I have downloaded and installed Bluezone terminal,
  • created a Robin script to utilize the TerminalEmulation module,
  • connected to the terminal session,
  • retrieved some info from it and printed it in the console output,
  • finally terminated the session.
    Here are the screenshots:

image

Now regarding the “Admin Rights”, by right-clicking on the application icon you should be able to see the option:


If you don’t you probably don’t have admin rights on your pc.
I am suspecting that this is a rights issue that can be resolved by your IT department.

Best regards,
J.


James Papadimitriou
Technical Evangelist

1 Like

@burque505 @Pravesh2891
Please be sure to check the guide I just created on TerminalEmulation actions.
Hope it helps

Best regards,
J.


James Papadimtriou
Technical Evangelist

1 Like

Hi James/Burque,

Thanks for your help.
Here i would like to mention few points which are observed while automating Blue Zone (32 Bit) and running the code without any errors -

  1. As mentioned by Burque , in properties “Run this program as an Admin” is selected that too with Change settings for all users.

  2. Also the Robin Editor was required to launch “As An Admin” and then open the required Robin file which was Terminal Actions file.
    Only then the Script was running fine.

  3. IF the Editor wasn’t launched “As An Admin” , the script was getting hanged at the GetTextFromScreen Action and after sometime , it is throwing error “Error Communicating With Emulator”
    This drawback may create problem while triggering this script through any sort of scheduling as the Robin Script will be triggered normally not as an Admin User

  4. For 32 Bit Blue Zone , OpenSession Action does not open terminal window rather we need to launch Terminal Window through RunApplication since OpenSession only works if the Terminal Window is already opened.
    As James already tested him script using BZ 64 bit , but our organisation have only 32 Bit Blue Zone which is licensed and we can only use the same.
    Thus as a work around i have designed my script using **

    ** to launch application and TerminateProcessByID to close Mainframe window.
    Here the only thing which was creating an issue is the launch of Mainframe window which was quite slower as the execution of the script and thus needed a hard coded delay between RunApplication and OpenSession , thus as of now i have used ShowMessageWithTimeout Action but if in Robin any action for hard coded delay available apart from this, please share the same.

I am attaching screenshot of my script.
Here the only show stopper which may affect our future implementation is the point number 3. Thus i request if you can escalate this further in order to fix RObin issues with 32 Bit Blue Zone

Thanks,
Pravesh

1 Like

Hi Pravesh, you might try this for scheduled tasks (I don’t know the name of your script, so I’ll call it “C:\Users\pravesh\Documents\Robin\BZ32.robin”, change as needed).

  1. Change properties of “C:\Program Files\Robin\Robin.exe” to “Run this program as an administrator” and “Change settings for all users”, change path if installed elsewhere.
  2. For testing, run the following code from an admin command prompt, adjusted for your script name and the proper executable path, using quotes if required:

C:\>"C:\Program Files\Robin\Robin.exe" run C:\Users\pravesh\Documents\Robin\BZ32.robin

I’d be very interested to know your results.
Regards,
burque505

Hi Burque thanks for the response but can you please attach BZ32.robin file as i am not sure how the schedule script to be written

Hi, Pravesh.

Sorry I wasn’t clear. For “C:\Users\pravesh\Documents\Robin\BZ32.robin” in step 2 above, substitute the full path and name of the Robin script you use to automate 32-bit BlueZone, perhaps the script for which you provided a screenshot above. It doesn’t refer to any code I’ve written.

You asked about a scheduling script, but Robin (as far as I know) doesn’t create such scripts. There are a number of ways to remotely trigger execution of commands; PowerShell is an alternative; the SysInternals PSExec command is often used; WMI is another possibility; and there are open-source workflow “orchestrators” available on GitHub.

The code snippet I provided above was intended to be for testing purposes, but you could potentially run that command (once tweaked for your setup) remotely.

There are some comments and links in this StackOverflow thread that may be of some use to you as well.

EDIT: I just found this WMIC tutorial that appears useful, although it is a bit short on how to remotely run commands. This one and this one may be more to the point.

Regards,
burque505