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
Copy file name to clipboardExpand all lines: README.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,63 @@ do {
153
153
}
154
154
```
155
155
156
+
### Wildcard transitions
157
+
158
+
An event definition in Stately may define a single wildcard transition. A wildcard transition will transition from any from state to the specified to state. The following example adds a broken state to the above example:
159
+
160
+
```swift
161
+
var stateClosed: State!
162
+
var stateOpened: State!
163
+
var stateBroken: State!
164
+
var eventOpen: Event!
165
+
var eventClose: Event!
166
+
var eventBroken: Event!
167
+
var stateMachine: StateMachine!
168
+
169
+
do {
170
+
// Define the states that the state machine can be in.
The [StatelyExample](https://github.com/softwarenerd/StatelyExample) project provides a fairly complete example of using Stately to build a garage door simulator. Other examples are planned.
0 commit comments