Engine API
Job lifecycle
Job states and the calls that move them.
Job states
- 01
pendingReady for a bot - 02
in_progressA bot works on it - 03
completedDone
| State | Meaning |
|---|---|
draft | Being prepared. Never assigned or started. |
scheduled | Waits for its time. |
pending | Ready to be assigned and started. |
in_progress | A bot is working on it. |
paused | On hold. |
completed, failed, canceled | Final. |
The calls that move it
| Call | From | To |
|---|---|---|
activate | draft | pending |
schedule | draft | scheduled |
start | pending, scheduled | in_progress |
pause | in_progress | paused |
resume | paused | in_progress |
complete | in_progress (expendable) | completed |
fail | active | failed |
cancel | active | canceled |
All are POST /engine/jobs/{id}/<call>. A job also completes on its own when its last node finishes.
Bots
- With
assignation: auto, REMI assigns a bot. Withmanual, useassign-bot. - With
start: auto, the job starts once its bot is free. Withmanual, callstart. swap-botsandtransfer-botmove bots between two jobs at the same location.- A job with
requiresBot: falseruns with no bot at all.
Nodes and actions
Node states: pending, in_progress, completed, failed. Action states add paused, skipped and canceled.
- Your own action types stay
in_progressuntil you complete, fail or skip them. loadandunloadfinish with load and unload: the bot closes its door and the action completes.- A node created with
released: falsewaits for release before the job moves on. jump-tosends a running job straight to a later node.
Concurrent edits
Each job has a version that goes up by one on every change. To reject a change made on top of someone else's, send the current version plus one: nextVersion on the lifecycle calls, version on PATCH. A mismatch answers JOB_VERSION_MISMATCH.