You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is not clear way to use its generic parameter, so data filed
is added to simple FinishedEvent. User will use cast to get its value,
but it is more clear than using multiple event types spiced with some "library magic".
Copy file name to clipboardExpand all lines: docs/index.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -411,8 +411,9 @@ Notifications about finishing are available in two forms:
411
411
Transitionfor `FinishedEvent` is detected by the library and matched by special kind of `EventMatcher`,
412
412
so such transition is triggered only for `FinishedEvent` that corresponds to this state.
413
413
`FinishingEvent` generated by finishing of another state will not trigger such transition.
414
+
415
+
If `FinalState` that triggered `FinishedEvent` is also a `DataState` then its data field will be copied into `FinishedEvent`.
414
416
See [transition on FinishedEvent sample](https://github.com/nsk90/kstatemachine/tree/master/samples/src/main/kotlin/ru/nsk/samples/FinishedEventSample.kt)
0 commit comments