|
2 | 2 | title: XState examples
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -XState v5 beta examples are also available in the [`/examples` directory](https://github.com/statelyai/xstate/tree/next/examples). Each example has a CodeSandbox link where you can run the example in your browser. |
| 5 | +XState v5 beta examples are also available in the [`/examples` directory](https://github.com/statelyai/xstate/tree/next/examples). Many of the examples have a CodeSandbox link where you can run the example in your browser. |
6 | 6 |
|
7 | 7 | ## Simple fetch example
|
8 | 8 |
|
@@ -117,6 +117,233 @@ A simple toggle built with:
|
117 | 117 | - [Toggle on GitHub](https://github.com/statelyai/xstate/tree/next/examples/toggle)
|
118 | 118 | - [Toggle on CodeSandbox](https://codesandbox.io/p/sandbox/github/statelyai/xstate/tree/next/examples/toggle)
|
119 | 119 |
|
120 |
| -**More examples are coming soon**. If you have any examples you want us to make, please [add a request to our feedback board](https://feedback.stately.ai/examples) or upvote an existing suggestion. |
| 120 | + |
| 121 | +## Hello world workflow |
| 122 | + |
| 123 | +Serverless hello world workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Hello-World-Example) built with: |
| 124 | + |
| 125 | +- XState v5 beta |
| 126 | + |
| 127 | +[Hello world workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-hello) |
| 128 | + |
| 129 | + |
| 130 | +## Greeting workflow |
| 131 | + |
| 132 | +Serverless greeting workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Greeting-Example) built with: |
| 133 | + |
| 134 | +- XState v5 beta |
| 135 | + |
| 136 | +[Greeting workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-greeting) |
| 137 | + |
| 138 | + |
| 139 | +## Event-based greeting workflow |
| 140 | + |
| 141 | +Serverless event-based greeting workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Event-Based-Greeting-Example) built with: |
| 142 | + |
| 143 | +- XState v5 beta |
| 144 | + |
| 145 | +[Event-based greeting workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-event-greeting) |
| 146 | + |
| 147 | + |
| 148 | +## Solving math problems |
| 149 | + |
| 150 | +Serverless math solving problem workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Solving-Math-Problems-Example) built with: |
| 151 | + |
| 152 | +- XState v5 beta |
| 153 | + |
| 154 | +[Solving math problems on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-math-problem) |
| 155 | + |
| 156 | + |
| 157 | +## Parallel execution workflow |
| 158 | + |
| 159 | +Serverless parallel execution workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Parallel-Execution-Example) built with: |
| 160 | + |
| 161 | +- XState v5 beta |
| 162 | + |
| 163 | +[Parallel execution workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-parallel) |
| 164 | + |
| 165 | + |
| 166 | +## Async function invocation workflow |
| 167 | + |
| 168 | +Serverless async function invocation workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Async-Function-Invocation-Example) built with: |
| 169 | + |
| 170 | +- XState v5 beta |
| 171 | + |
| 172 | +[Async function invocation workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-async-function) |
| 173 | + |
| 174 | + |
| 175 | +## Async subflow invocation workflow |
| 176 | + |
| 177 | +Serverless async subflow invocation workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Async-SubFlow-Invocation-Example) built with: |
| 178 | + |
| 179 | +- XState v5 beta |
| 180 | + |
| 181 | +[Async subflow invocation workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-async-subflow) |
| 182 | + |
| 183 | + |
| 184 | +## Event-based transitions (event-based switch) workflow |
| 185 | + |
| 186 | +Serverless event-based transitions workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Event-Based-Transitions-Example) built with: |
| 187 | + |
| 188 | +- XState v5 beta |
| 189 | + |
| 190 | +[Event-based transitions workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-event-based) |
| 191 | + |
| 192 | + |
| 193 | +## Applicant request decision workflow |
| 194 | + |
| 195 | +Serverless applicant request decision workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Applicant-Request-Decision-Example) built with: |
| 196 | + |
| 197 | +- XState v5 beta |
| 198 | + |
| 199 | +[Applicant request decision workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-applicant-request) |
| 200 | + |
| 201 | + |
| 202 | +## Provision orders (error handling) workflow |
| 203 | + |
| 204 | +Serverless provision orders (error handling) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Provision-Orders-Example) built with: |
| 205 | + |
| 206 | +- XState v5 beta |
| 207 | + |
| 208 | +[Provision orders (error handling) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-provision-orders) |
| 209 | + |
| 210 | + |
| 211 | +## Monitor job for completion (polling) workflow |
| 212 | + |
| 213 | +Serverless monitor job for completion (polling) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Monitor-Job-Example) built with: |
| 214 | + |
| 215 | +- XState v5 beta |
| 216 | + |
| 217 | +[Monitor job for completion (polling) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-monitor-job) |
| 218 | + |
| 219 | + |
| 220 | +## Send CloudEvent on workflow completion |
| 221 | + |
| 222 | +Serverless send CloudEvent on workflow completion workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Send-CloudEvent-On-Workflow-Completion-Example) built with: |
| 223 | + |
| 224 | +- XState v5 beta |
| 225 | + |
| 226 | +[Send CloudEvent on workflow completion on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-send-cloudevent) |
| 227 | + |
| 228 | + |
| 229 | +## Monitor patient vital signs workflow |
| 230 | + |
| 231 | +Serverless monitor patient vital signs workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Monitor-Patient-Vital-Signs-Example) built with: |
| 232 | + |
| 233 | +- XState v5 beta |
| 234 | + |
| 235 | +[Monitor patient vital signs workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-monitor-patient) |
| 236 | + |
| 237 | + |
| 238 | +## Finalize college application workflow |
| 239 | + |
| 240 | +Serverless finalize college application workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Finalize-College-Application-Example) built with: |
| 241 | + |
| 242 | +- XState v5 beta |
| 243 | + |
| 244 | +[Finalize college application workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-finalize-college-app) |
| 245 | + |
| 246 | + |
| 247 | +## Perform customer credit check workflow |
| 248 | + |
| 249 | +Serverless perform customer credit check workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Perform-Customer-Credit-Check-Example) built with: |
| 250 | + |
| 251 | +- XState v5 beta |
| 252 | + |
| 253 | +[Perform customer credit check workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-credit-check) |
| 254 | + |
| 255 | + |
| 256 | +## Handle car auction bids (scheduled start) workflow |
| 257 | + |
| 258 | +Serverless handle car auction bids (scheduled start) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Handle-Car-Auction-Bids-Example) built with: |
| 259 | + |
| 260 | +- XState v5 beta |
| 261 | + |
| 262 | +[Handle car auction bids (scheduled start) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-car-auction-bids) |
| 263 | + |
| 264 | + |
| 265 | +## Check inbox periodically (cron-based workflow start) |
| 266 | + |
| 267 | +Serverless check inbox periodically (cron-based workflow start) from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Check-Inbox-Periodically) built with: |
| 268 | + |
| 269 | +- XState v5 beta |
| 270 | + |
| 271 | +[Check inbox periodically (cron-based workflow start) on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-check-inbox) |
| 272 | + |
| 273 | + |
| 274 | +## Event-based service workflow |
| 275 | + |
| 276 | +Serverless event-based service workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Event-Based-Service-Invocation) built with: |
| 277 | + |
| 278 | +- XState v5 beta |
| 279 | + |
| 280 | +[Event-based service workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-event-based-service) |
| 281 | + |
| 282 | + |
| 283 | +## Reusing function and event definitions workflow |
| 284 | + |
| 285 | +Serverless reusing function and event definitions workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Reusing-Function-And-Event-Definitions) built with: |
| 286 | + |
| 287 | +- XState v5 beta |
| 288 | + |
| 289 | +[Reusing function and event definitions workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-reusing-functions) |
| 290 | + |
| 291 | + |
| 292 | +## New patient onboarding (error checking and retries) workflow |
| 293 | + |
| 294 | +Serverless new patient onboarding (error checking and retries) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#new-patient-onboarding). |
| 295 | + |
| 296 | +[New patient onboarding (error checking and retries) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-new-patient-onboarding) |
| 297 | + |
| 298 | + |
| 299 | +## Purchase order deadline (ExecTimeout) workflow |
| 300 | + |
| 301 | +Serverless purchase order deadline (ExecTimeout) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#purchase-order-deadline) built with: |
| 302 | + |
| 303 | +- XState v5 beta |
| 304 | + |
| 305 | +[Purchase order deadline (ExecTimeout) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-purchase-order-deadline) |
| 306 | + |
| 307 | + |
| 308 | +## Accumulate room readings and create timely reports (ExecTimeout and KeepActive) workflow |
| 309 | + |
| 310 | +Serverless accumulate room readings and create timely reports (ExecTimeout and KeepActive) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#accumulate-room-readings) built with: |
| 311 | + |
| 312 | +- XState v5 beta |
| 313 | + |
| 314 | +[Accumulate room readings and create timely reports (ExecTimeout and KeepActive) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-accumulate-room-readings) |
| 315 | + |
| 316 | + |
| 317 | +## Car vitals checks (SubFlow Repeat) workflow |
| 318 | + |
| 319 | +Store a single bid when the car auction is active. |
| 320 | + |
| 321 | +Serverless car vitals checks (SubFlow Repeat) workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#handle-car-auction-bids-example) built with: |
| 322 | + |
| 323 | +- XState v5 beta |
| 324 | + |
| 325 | +[Car vitals checks (SubFlow Repeat) workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-car-vitals) |
| 326 | + |
| 327 | + |
| 328 | +## Book lending workflow |
| 329 | + |
| 330 | +Serverless book lending workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#book-lending) built with: |
| 331 | + |
| 332 | +- XState v5 beta |
| 333 | + |
| 334 | +[Book lending workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-book-lending) |
| 335 | + |
| 336 | + |
| 337 | +## Filling a glass of water workflow |
| 338 | + |
| 339 | +Serverless filling a glass of water workflow from the [CNCF Serverless Workflow examples](https://github.com/serverlessworkflow/specification/tree/main/examples#Filling-a-glass-of-water) built with: |
| 340 | + |
| 341 | +- XState v5 beta |
| 342 | + |
| 343 | +[Filling a glass of water workflow on GitHub](https://github.com/statelyai/xstate/tree/next/examples/workflow-filling-water) |
| 344 | + |
| 345 | +## More examples coming soon |
| 346 | + |
| 347 | +If you have any examples you want us to make, please [add a request to our feedback board](https://feedback.stately.ai/examples) or upvote an existing suggestion. |
121 | 348 |
|
122 | 349 | If you have an example you want to share, [contribute your example to the XState repository](https://github.com/statelyai/xstate/tree/next/examples#contributing-an-example).
|
0 commit comments