Back to Browse

Modelling Statecharts: A step-by-step guide

7.2K views
Feb 14, 2022
19:26

Matt takes you through modelling a statechart using a step-by-step guide. 1. List the events 2. List the tasks, and split them into 'actions' and 'services' 3. Figure out the machine's lifecycle 4. Figure out the initial state 5. Continue building the states out from the initial, using the tasks and events as a guide. The machine: https://stately.ai/registry/editor/5da4f4f4-405a-4d64-81c6-d8df95364340 Matt's blog on actions vs services: https://stately.ai/blog/should-this-be-an-action-or-a-service 0:00 Intro 0:32 Listing the events 3:38 Listing the tasks 4:46 Machine lifecycle 5:26 Services & Actions 6:40 Events related to services 7:25 Figuring out the first state 8:30 What events does the first state accept? 9:25 Figuring out the second state 10:15 Linking the first state to the second 10:57 Deciding to group them together 11:40 Making it a guarded transition 13:12 Figuring out add tweet to thread button 13:54 Sending tweet state 16:18 Simulating the whole machine 17:30 Some new functionality appears! 17:58 Showing discard modal chart 19:04 Outro

Download

0 formats

No download links available.

Modelling Statecharts: A step-by-step guide | NatokHD