Skip to content

Commit b65c8ea

Browse files
authored
Update docs examples page (#179)
* Fix link text for feedback board, closes STA-3978 * Link to V5 examples from V4 examples page * Add workflow examples to V5 examples page to update page Closes STA-4670
1 parent 0b71461 commit b65c8ea

File tree

2 files changed

+232
-3
lines changed

2 files changed

+232
-3
lines changed

docs/examples/intro.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Request examples'
33
---
44

5-
**Examples are coming soon**. If you have any examples you want us to make, please [add a request to our Canny request board](https://feedback.stately.ai/examples) or upvote an existing suggestion.
5+
**Find [examples for XState V5 beta](/docs/xstate-v5/examples) in the XState V5 section of these docs.**
6+
7+
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.
68

79
If you have an example you want to share, [let us know on our Stately Discord](https://discord.gg/xstate).

versioned_docs/version-5/examples.mdx

Lines changed: 229 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: XState examples
33
---
44

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.
66

77
## Simple fetch example
88

@@ -117,6 +117,233 @@ A simple toggle built with:
117117
- [Toggle on GitHub](https://github.com/statelyai/xstate/tree/next/examples/toggle)
118118
- [Toggle on CodeSandbox](https://codesandbox.io/p/sandbox/github/statelyai/xstate/tree/next/examples/toggle)
119119

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.
121348

122349
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

Comments
 (0)