Skip to content

How To Accumulate Data Across Multiple Events And States? #112

Answered by nsk90
rs-georg asked this question in Q&A
Discussion options

You must be logged in to vote

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.
In State subclasses (steps) your can declare properties to hold all the necessary data. And fill it when the step is complete.
At the last step you can get all that properties from states (by direct references or using findState api).
Alternatively you can store all per-step data in some separate data structure (outside of StateMachine).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rs-georg
Comment options

Answer selected by rs-georg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants