Run Bot on a particular RPA Node

rpa
node

#1

When developing RPA logic for your bot one may face a case where it is required to run the logic on a particular RPA node available on the RPA Grid.

Few things to remember:

  1. Remember, each node has its unique node id - the identification, based on which the RPA Grid distinguish all its RPA Nodes.
  2. A bot configuration has access to the context variables at runtime, the selenium_node_id - is one of the varibles.
  3. When you have N RPA nodes in your RPA Grid, and you have exactly N records to process by a bot, you can create a Bot Source with the exact N threads, each of your records will be processed simultaneously by running instance of your Bot on each RPA node (t_his assumes all nodes are free and have exact same capabilities_)

To figure out unique identified for each of your RPA nodes:

  1. Create separate bot source with number of threads equal to the number of your RPA nodes

  2. Create sample input file containing number of records equal to the number of your RPA nodes

  3. Create a simple business process with a single bot configuration:

    <?xml version="1.0" encoding="UTF-8"?>
    <config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
     	<selenium-flow>
     	<selenium browser="internet explorer"></selenium>
     </selenium-flow>
    <export include-original-data="true">
     <single-column name="exec_node_id" value="${selenium_node_id.toString()}"/>
    </export>
    
  4. For you bot configuration file specify your new bot source.

Upon running the BP, the output should be something like

record, node_id_hash
1, 7cfa1b9ad41434bb56ff0225864cbb17http://127.0.0.1:5001
2, 7cfa1b9ad41434bb56ff0225864cbb17http://127.0.0.1:5002

And now, when testing a bot configuration, you can use the node-id from the output file to run you logic on a particular RPA node

<!-- Internet explorer driver -->
     <selenium-flow node-id="7cfa1b9ad41434bb56ff0225864cbb17http://127.0.0.1:5001">
        <selenium name="seleniumDriver" browser="internet explorer" close-on-completion="true" start-in-private="true">
   ...

#2

Hi, @semelianov
Node-id using for selenium-flow tag:

<selenium-flow node-id="">
  <selenium ...>
  </selenium>
</selenium-flow>

Best Regards
Kanstantsin Sheleh


#3

The solution above makes sense when one has no ability to re-configure RPA nodes and there many identically configured nodes within your RPA Grid.
For cases when you can re-configure a node, you may use custom capability as described on the RPA Node Capabilities page


#4

Hi - I want run my bot in all the nodes (Bot can pickup any nodes while run it, but my bot should run all the nodes)

What configuration should i mention inside BOT.

So kindly help me to run a bot in all the nodes