How to handle an external response dependency in the middle of an automation process

Hello everyone,

I’m working on an automation process in UiPath, and I’ve hit a challenge where, midway through the process, I depend on an external application’s response before the process can continue. Essentially, I execute the first part of the automation, then I need to pause the process until I receive confirmation (or a specific response) from the external application. Once that happens, I want to resume from where I left off.

I’m unsure of the best way to implement this waiting logic. I’ve come across a few potential approaches:

  • Long Running Workflows (using “Suspend” and “Resume”)
  • State Machine with an intermediate state waiting for the response
  • Splitting the process into two separate automations and using an external trigger (e.g., an email, a webhook, or a queue item)
  • Orchestrator Tasks / Form Tasks, where the process waits for a manual action or an event

I would really appreciate some concrete advice or best practices to manage this pause efficiently without keeping the robot running in idle mode for an extended period.

Specific questions:

  1. How have you implemented waiting for an external response (whether from a web service, email, or another application)?
  2. Would it be better to use Long Running Workflows, or is splitting the automation into two separate processes a more scalable approach?
  3. Have you encountered any issues with data persistence (variables, arguments) when resuming execution?

Any ideas, best practices, or example workflows would be a huge help. Thanks in advance!

@Alexandru_Duta

How are you getting the response?

The next steps depend on that…long running makes sense based on what kind of response

Also better to split the process if you know a timeline

In long running workflow serializable variables in current scope only persist remaining would not

Cheers

Kindly share the following details

  1. What is the expected response . Example - email from third party / success message in the application itself / a file getting generated in a different folder etc

  2. Are you using RE Framework. If yes - Is the code part of Dispatcher / Performer?

  3. Any SLA to be maintained after First Automation?

The first application runs up to a certain point, and to continue, it requires an APPROVE status, which is obtained from another application. The process depends on this status to proceed further.

Please confirm if there is an automated mechanism to retrieve this status or if manual intervention is required.