Transitions

A transition defines the change from one state to the next.

Transitions are evaluated in order. If multiple transitions apply, only the first one is used.

initial:
  title: Waiting in the lobby
  description: Participants can join until the organizer starts
  transitions:
    - on: join
      by: participant
      goto: ~
    - on: join
      by: organizer
      goto: start
    - on: cancel
      by: organizer
      goto: (canceled)
    - after: 10 days
      goto: (expired)

Properties

on

string

Key of the action that must be performed for this transition to be selected.

by

string or array of string

Key of an actor or multiple actors as array. Only select this transition if the action is performed by this actor / one of these actors.

after

time

A time after which the transition should be executed. If you specify a timeout using after do not use the on and by property.

The time should be in the form of 'amount unit' in English, eg '10 minutes', '12 hours`, or `1 week`.

goto

string

Key of the state where to transition to.

if

boolean or function

A boolean that must be true for the transition to be selected. This is typically a <ref> data instruction.

Last updated

Was this helpful?