Replies: 1 comment
-
Hi, sorry looks I missed your question. There is no some built-in helper for such task, so the most strait-forward way seems to be using State subclasses for each step. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Imagine a form or wizard that has multiple steps. Each steps collects data, then moves to the next step. In the final step, all data collected in the previous steps should be available so it can be processed/uploaded/...
Is this possible? How could it be done?
For example
Get username and email
machine.processEvent(UserData(username, email))
--> transition to Step 2
Get city and street
machine.processEvent(Location(city, street))
--> transition to Step 3
Ask for favorite food
machine.processEvent(FavoriteFood("pizza"))
--> transition to Step 4
Search for restaurant that serves pizza in the provided city close to the street
--> This means we need to have all the data from previous states in this last state
Beta Was this translation helpful? Give feedback.
All reactions