KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


2 posters

    Cycling through multiple devices in one robot

    avatar
    Virulent


    Posts : 6
    Points : 2066
    Join date : 2018-09-10

    Cycling through multiple devices in one robot Empty Cycling through multiple devices in one robot

    Post by Virulent Thu Sep 13, 2018 3:41 am

    I'm trying to get a robot to connect to a series of devices based off a query, but it looks like the only way I can get this to happen is to create a new dynamic mapping for each potential record returned, and then use that mapping in the DA Connect To step?  I haven't been able to get this to function correctly yet, so looking for any tips.

    Has anyone found a way to make this work in one robot?  My other design is to have one robot decide which system it needs to connect to, and call another robot via webservice passing the device info over... but that runs me into CRE caps during critical process times.
    pavel.vraj
    pavel.vraj


    Posts : 86
    Points : 2823
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Cycling through multiple devices in one robot Empty Re: Cycling through multiple devices in one robot

    Post by pavel.vraj Fri Sep 21, 2018 2:07 pm

    Hi,

    the dynamic mapping works well. Here is the best approach I have used to use dynamic devices:
    - First of all set the DAS to single user mode.
    - In DS add new DA step, to Required devices add dynamic reference and type any name.
    - In DA WF add Open step and use "rdp://<user>:<pwd>@<host>" syntax to establish the connection.
    - Add Connect step, where you type the details of the DAS service with <host> again.
    - After this the dynamic device is used, the connection is established and you can do whatever you need.

    Cycling through multiple devices in one robot Kapow_18
    Cycling through multiple devices in one robot Kapow_19
    Cycling through multiple devices in one robot Kapow_20


    To use this scenarion in your case, you have to have variable, which will contain the host name. The host name is the one, what is doing the selection of the device, so based on some input data, you have to select which host should be used, store the host name into the variable and place this variable as input in DA WF. Then in Open step as well as in Connect step use the variable to select the host instead of typing specific host.


    Keep in mind, you have to close the connection at the end of the robot to be sure, you'll be able to connect again.


    Best regards,
    Pavel Vraj
    avatar
    Virulent


    Posts : 6
    Points : 2066
    Join date : 2018-09-10

    Cycling through multiple devices in one robot Empty Re: Cycling through multiple devices in one robot

    Post by Virulent Fri Sep 21, 2018 6:45 pm

    I have the dynamic connection working, and either through scheduler passing a value to the host variable, or another robot passing it in.  How do you disconnect the Device from the mapping once it is established?  I had assumed that would be a way to go, but can find no command nor structure or guide on how to make it happen.
    pavel.vraj
    pavel.vraj


    Posts : 86
    Points : 2823
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Cycling through multiple devices in one robot Empty Re: Cycling through multiple devices in one robot

    Post by pavel.vraj Fri Sep 21, 2018 7:27 pm

    Hi,


    I don't understand fully your issue. You say, you open the connection, but can't see the desktop? Or what is the issue?


    As I said, you have to add at least three steps:
    1) "Open step" - where you use the "rdp://<user>:<pwd>@<host>" format of connection. This will open the connection to that desktop, but you will not see anything yet.
    2) "Connect to Device step" - here you type the connection details and here you type the DAS settings like Device (the name you said in the dynamic reference and where the connection was established in previous Open step), Host (your host name), Port (default 49998), Token (your chosen token for the device), Timeout and Attempts. Sometimes the connection is not established if you use this step right after "Open step", so you have to do a several retries to be sure, the connection is up and running. You should use Try step for this.
    3) After you finish the robot, Lock the Screen with "Remote Device Action step". This will ensure you, you will be able to do new connection later.


    Here is the minimum without Try step, which is working step-by-step:
    Cycling through multiple devices in one robot Kapow_21


    BR, Pavel
    avatar
    Virulent


    Posts : 6
    Points : 2066
    Join date : 2018-09-10

    Cycling through multiple devices in one robot Empty Re: Cycling through multiple devices in one robot

    Post by Virulent Fri Sep 21, 2018 7:38 pm

    I can open the connection, run the process I want to do, but then, I'd want to connect to another Device to repeat that same process on a different server, passing the hostname as a variable into the DA step.  I'm working in a distributed environment with a legacy application.  However, once I have connected to the first server, the dynamic device (ie "Server") is stated to already be defined on the next iteration when it gets to the first DA step where I'm passing in the host.

    Considering I have 270+ possible servers to connect to, setting up individual mappings for each, or having to set a scheduled item for each is not ideal as maintenance becomes a nightmare.

    So, I'm finding out the "Dynamic" mapping isn't very dynamic... it allows for a one time setup per robot instance, but there is no way to alter it once it is connected the first time in said instance.

    Sponsored content


    Cycling through multiple devices in one robot Empty Re: Cycling through multiple devices in one robot

    Post by Sponsored content


      Current date/time is Sat Apr 27, 2024 7:39 pm