Run second robot IF the first one was successfully executed

Hi everyone,

I am sorry if there’s already another topic addressing the same issue but I couldn’t find any.

So, this is my current scenario: I am trying to automatize one process. But I’ve split that process in 3 smaller ones and naturally developed 3 different robots.

I need to start the 2nd one only if the first one was executed succesfully.
The second robot needs an output provided by the first one.
One way of doing it would be checking if file X is in a pre-specified path.
However, I might have an old file in the same path and it would trigger the second robot anyway.
Maybe another way of doing it is: besides checking if file exists, also check the date of file.

But I do feel there’s a smarter way of doing it using UiPath logs - meaning I would write to log “First robot successfuly run!” and the second one would start if it found that specific message in the log generated by the first one.

Is it viable? How can I achieve that? Is there a smarter way of doing it?

Thanks in advance.

It is important to say I don’t have Orchestrator at the moment.
I am trying to perfom that in STUDIO.

Could you please provide more details? When you say three different robots, do you mean three different workflow?

I am assuming three different process developed and 2nd process need to start as soon as 1st completes. Did you try invoke workflow based on the condition that 1st process successful?

You can also check activity “Start a Job” if that works for you.

Hi @pawanbag,

That’s basically it. You can see it as 3 different processes.

That’s what I need: start second worfklow (more specifically, invoke seconde .xaml file) only if the first one (the first invoke .xaml file) run successfully.


Right now, I am using the structure above. If the first invoke is sucessful (dealing with some exceptions in try catch) then generate “fake” file. If fake file exists then run second workflow.

1 Like