Skip to content

States and lifecycle

An execution is a specific run of a process on a machine. From creation to completion, it goes through a series of well-defined states. Knowing them allows you to know, at a glance, what is happening and why.

stateDiagram-v2
  [*] --> queued
  queued --> running
  queued --> cancelled: cancelada antes de empezar
  running --> completed: terminó bien
  running --> failed: terminó con error
  running --> stopped: detenida a pedido
  running --> cancelled: terminada en ejecución
  running --> paused: pausada
  paused --> running: reanudada
  paused --> stopped: detenida
  paused --> cancelled: terminada
  completed --> [*]
  failed --> [*]
  stopped --> [*]
  cancelled --> [*]
EstadoDescriptionHow to get there
queuedIn queue, waiting for the selected agent to receive itWhen creating the execution (manual or by trigger)
runningThe agent is running the processThe agent receives the order and begins
completedCompleted successfully (exit code 0)The playbook finished without errors
failedEnded with errorPlaybook error, exit code ≠ 0, or agent disconnection
stoppedStopped on request, with nothing left halfwayA user asked to Stop and the process stopped at a safe point
cancelledCancelled or terminated before it finishedA user cancelled or terminated it, or it exceeded its maximum duration
pausedPaused: still at the next activity, ready to continueA user clicked Pausar (Pause); Reanudar (Resume) returns it to running

The execution exists but the selected agent has not yet received it. It usually lasts seconds. If it stays here, that machine is usually Desconectada (Disconnected) or Ocupada (Busy); the detail shows the time in queue and why it is waiting. See Machine monitoring.

The agent downloaded the package and is running the playbook. Here you see the real-time logs. The machine running it shows as Ocupada (Busy).

The playbook reached the end without throwing an error and returned exit code 0. It is the expected result of a healthy run.

Something prevented the execution from being completed. Typical causes:

  • An activity threw an unhandled error (a selector that does not appear, a file that does not exist, a credential that does not resolve).
  • The playbook ended with an exit code other than 0.
  • The agent disconnected during execution and did not reconnect within the grace period.

Always check the logs to see the exact cause.

Someone terminated it (or cancelled it while queued) from the portal, the Designer or the Agent before it finished. Useful for killing a process that was stuck or launched by mistake.

Someone asked to Stop and the process stopped at a safe point: it finished what it was doing and closed cleanly. It is not an error. See Stop or terminate.

Someone clicked Pausar (Pause): the robot stays still at the next activity and keeps everything it had. Reanudar (Resume) continues from there; you can also Stop or Terminate a paused execution.

A running execution can be ended in two ways, from the portal (executions list and detail), the Designer or the Agent tray:

ActionWhat it doesFinal state
StopLets it finish what it is doing and start nothing else. Meanwhile the execution shows Deteniendo (Stopping)stopped (Stopped)
TerminateCuts it right away. What it was doing is left halfway; the finally of a Try / Catch gets a few seconds to close what is open, and the queue items it had locked go back to the queue immediately.cancelled (Cancelled)

Stop works when the process checks for it: Process Queue does it by itself and, anywhere else, the Should Stop activity. The Designer templates already include it.

For a queued execution that hasn’t started yet, the action is Cancel: it leaves the queue and never runs.

If the machine running an execution loses connection to Zoan Cloud and does not reconnect within a grace period (~3 minutes), the run is automatically marked as failed. This prevents a run from being “hung” indefinitely if the machine goes down or the network goes down.

It is a different time than it takes for the machine to show as Desconectada (~2 minutes without a heartbeat). One monitors the machine’s health; the other, the destination of a specific execution.

By default the platform does not impose a duration limit: a process can take seconds or hours depending on what it does, and nothing cuts it on its own.

To make sure a machine isn’t held by a stuck robot, set a Duración máxima (opcional, minutos) (Maximum duration, optional, minutes), from 1 minute to 7 days. If the execution takes longer, it is terminated with a clear error. It can be set at several levels, and the most specific wins:

  1. When starting the execution.
  2. On the trigger that launches it.
  3. On the process (Actualizar versión, Update version, in its ⋮ menu).
  4. On the project, from the Designer.

The execution detail shows the Límite (Limit) that applies. On the process you can also turn on the Robot atascado (Stuck robot) alert: if the minutes you set pass Sin avance (without progress), the portal flags it and, only if you choose so, cancels it.