Engine API

Job lifecycle

Job states and the calls that move them.

Markdown

Job states

  1. 01pendingReady for a bot
  2. 02in_progressA bot works on it
  3. 03completedDone
StateMeaning
draftBeing prepared. Never assigned or started.
scheduledWaits for its time.
pendingReady to be assigned and started.
in_progressA bot is working on it.
pausedOn hold.
completed, failed, canceledFinal.

The calls that move it

CallFromTo
activatedraftpending
scheduledraftscheduled
startpending, scheduledin_progress
pausein_progresspaused
resumepausedin_progress
completein_progress (expendable)completed
failactivefailed
cancelactivecanceled

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. With manual, use assign-bot.
  • With start: auto, the job starts once its bot is free. With manual, call start.
  • swap-bots and transfer-bot move bots between two jobs at the same location.
  • A job with requiresBot: false runs 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_progress until you complete, fail or skip them.
  • load and unload finish with load and unload: the bot closes its door and the action completes.
  • A node created with released: false waits for release before the job moves on.
  • jump-to sends 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.