How do we give Output of First Robot as input to Second Robot,and based on the output the 2nd robot should be invoked and started with its process?


#1

I have requirement where in my first robot i have multiple status ,and based on the different status
the 2nd robot or 3rd robot or 4th robot must be invoked
as soon as the first robot finishes its process and updates the status then based on that status respective robots should be invoked and started accordingly
how do i approach this ?


#2

@srishsai
You can do this in below ways:

  1. One robot can set the flag/status in Database/Excel/Orchestrator queues as soon as it finishes its task and the other robots should be running( can be scheduled based on the first robot total execution time) to check if that flag/status is set . If yes then start processing else wait for the flag/status to be set.

  2. If you are using 2018.* version of uipath then you can use “Start Job” activity in order to run a job on specified number of robots. In your scenario there will be a robot which will be resposible to do the initial steps and then trigger other bots to perform remaining/next steps.

Let me know if this suits your expectation.


#3

@srishsai You can also create a bot using orchestrator API to trigger Bot_2 based on completion\output of Bot_1.

Invoke HTTP web request : https://YourOrchestratorUrl/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs

Update above link based on your orchestrator URL

Input parameters:

  1. Release key
  2. Robot ID

#4

Hi @Madhavi_Jaiswal

As per my understanding ,we can start jobs through orchestrator Api within a single robot ,
but what i want is based on the 1st robot result i want to invoke automatically the 2nd robot
if you have any sample part of it ,kindly share it here,
it would be really helpful.


#5

@srishsai
You can trigger your job in any robot .

You will have to specify the particular Bot ID and Job ID(release key) in the input parameters

For ex: $json = “{”“startInfo”": {"“ReleaseKey”": ““asd6c9ba-6f7f-4ddd-b180-9851441536ca””,"“RobotIds”": [123],"“NoOfRobots”": 0,"“Strategy”": ““Specific””}}"

Please refer API calls https://orchestrator.uipath.com/v2018.1/reference#api-references


#6

Hi @Madhavi_Jaiswal,

Thanks for your reply ,
I know we can trigger a job in any number of robots ,but my question remains the same
that i want to give the result /output of 1st robot as input to 2nd robot ,can you please tell me in detail how do we approach this and kindly share sample if any!!


#7

Did you hear back on this one?
I’m starting to research and Pryia Dubey mentioned 2 ways to do it and really I’m looking at the 2nd option. Is that what you went with?
.If you are using 2018.* version of uipath then you can use “Start Job” activity in order to run a job on specified number of robots. In your scenario there will be a robot which will be responsible to do the initial steps and then trigger other bots to perform remaining/next steps.


#8

You can use transaction items in a queue, then use the start job activity to have the correct robot work on the job.

The transaction item contains a dictionary (of string, object) that you can reference, so you can store your variables in that.


#9

Ok. We already use transaction items in queue So we just need to use the start job activity to have the correct bit work it.

We worked on this some today and I will continue to see if I can get this to work.

Thanks


#10

Dave, I hate to be slow on this. But are you saying you would do a Start Job process?
This is what I have:

But I’m getting:

I have not completed any set up in Orchestrator so I feel like that is the issue but wanted to check in with you to see if I’m on the right path.

Thanks!


#11

I feel like I’ve gotten most of this working now.

Of course the last step is the Start Job process that is not working. But i think it is due to my read text file in that job I think i need to make sure my release key and data is correct. I’m getting the status code of 400.

I think I’m good so no response needed. Thanks!


#12

Hi, we have implemented Start Job for one of our processes. And what we have found out today is that even though the queue only has two items all 10 of the VM’s tried to run the job.

So do you feel that i need to do the HTTP Request to run a job like your example? Instead of having it after adding it to the queue in the process job?

Thanks!