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.
The life cycle
Section titled “The life cycle”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 --> [*]
| Estado | Description | How to get there |
|---|---|---|
queued | In queue, waiting for the selected agent to receive it | When creating the execution (manual or by trigger) |
running | The agent is running the process | The agent receives the order and begins |
completed | Completed successfully (exit code 0) | The playbook finished without errors |
failed | Ended with error | Playbook error, exit code ≠ 0, or agent disconnection |
stopped | Stopped on request, with nothing left halfway | A user asked to Stop and the process stopped at a safe point |
cancelled | Cancelled or terminated before it finished | A user cancelled or terminated it, or it exceeded its maximum duration |
paused | Paused: still at the next activity, ready to continue | A user clicked Pausar (Pause); Reanudar (Resume) returns it to running |
Cada estado en detalle
Section titled “Cada estado en detalle”queued
Section titled “queued”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.
running
Section titled “running”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).
completed
Section titled “completed”The playbook reached the end without throwing an error and returned exit code 0. It is the expected result of a healthy run.
failed
Section titled “failed”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.
cancelled
Section titled “cancelled”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.
stopped
Section titled “stopped”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.
paused
Section titled “paused”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.
Stop or terminate
Section titled “Stop or terminate”A running execution can be ended in two ways, from the portal (executions list and detail), the Designer or the Agent tray:
| Action | What it does | Final state |
|---|---|---|
| Stop | Lets it finish what it is doing and start nothing else. Meanwhile the execution shows Deteniendo (Stopping) | stopped (Stopped) |
| Terminate | Cuts 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.
Retries
Section titled “Retries”Machine disconnection
Section titled “Machine disconnection”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.
Maximum duration
Section titled “Maximum duration”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:
- When starting the execution.
- On the trigger that launches it.
- On the process (Actualizar versión, Update version, in its ⋮ menu).
- 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.
Next steps
Section titled “Next steps”- Execution Logs — diagnose what happened.
- Run manually — retry after failure.
- Machine monitoring — why something stays on
queued.