{
  "version": 0,
  "entry": "b1",
  "blocks": {
    "b1": {
      "type": "createFolder",
      "inputs": {
        "path": "::HOME::/automation-agent-runtime-tests"
      },
      "next": "b2"
    },
    "b2": {
      "type": "setVar",
      "inputs": {
        "name": "path",
        "value": "::HOME::/automation-agent-runtime-tests/sleep-flush-example.txt"
      },
      "next": "b3"
    },
    "b3": {
      "type": "writeTextFile",
      "inputs": {
        "path": {
          "var": "path"
        },
        "text": "hello after flush",
        "append": false,
        "flushNow": false
      },
      "next": "b4"
    },
    "b4": {
      "type": "sleep",
      "inputs": {
        "durationMs": 0,
        "commitPendingActionsBeforeSleep": false,
        "flushFileBuffersBeforeSleep": true
      },
      "next": "b5"
    },
    "b5": {
      "type": "setVar",
      "inputs": {
        "name": "existsAfterSleep",
        "value": {
          "type": "fileExists",
          "inputs": {
            "path": {
              "var": "path"
            }
          }
        }
      },
      "next": "b6"
    },
    "b6": {
      "type": "esConsoleLog",
      "inputs": {
        "message": {
          "type": "textJoin",
          "inputs": {
            "items": [
              "existsAfterSleep=",
              {
                "var": "existsAfterSleep"
              }
            ]
          }
        }
      },
      "next": null
    }
  }
}
