scxml 0.2.0

W3C SCXML statechart library — parse, validate, export, and simulate Harel statecharts. Framework-agnostic, WASM-ready, rkyv zero-copy.
Documentation
{
  "id": "document-lifecycle",
  "initial": "draft",
  "states": {
    "draft": {
      "on": {
        "submit": "submitted"
      }
    },
    "submitted": {
      "on": {
        "start_review": "review"
      }
    },
    "review": {
      "on": {
        "approve": {
          "target": "approved",
          "guard": "all_reviewers_complete"
        },
        "request_changes": "draft"
      }
    },
    "approved": {
      "on": {
        "archive": "archived"
      }
    },
    "archived": { "type": "final" }
  }
}