@@ -72,19 +72,7 @@ to the flow.
72
72
If we only use the `morning` component in our project, the `MorningRoutine` flow
73
73
graph would look like the following:
74
74
75
- [mermaid, format="svg"]
76
- ----
77
- flowchart TD
78
- a(WAKE_UP)
79
- b(selfcare::SHOWER)
80
- c(selfcare::GET_DRESSED)
81
- d(food::MAKE_COFFEE)
82
- e(food::DRINK_COFFEE)
83
- a --> b
84
- b --> c
85
- c --> d
86
- d --> e
87
- ----
75
+ mermaid::morning_flow1.mmd[format="svg"]
88
76
89
77
The power of `flow` services comes when more than one component adds actions to
90
78
the flow. Flows can be extended by inserting additional actions with new
@@ -114,28 +102,7 @@ struct childcare {
114
102
115
103
The new steps are inserted into the existing `flow`'s dependency graph:
116
104
117
- [mermaid, format="svg"]
118
- ----
119
- flowchart TD
120
- a(WAKE_UP)
121
- b(selfcare::SHOWER)
122
- c(selfcare::GET_DRESSED)
123
- d(food::MAKE_COFFEE)
124
- e(food::DRINK_COFFEE)
125
- a --> b
126
- b --> c
127
- c --> d
128
- d --> e
129
- f(food::MAKE_BREAKFAST)
130
- g(food::EAT_BREAKFAST)
131
- h(childcare::PACK_SCHOOL_LUNCHES)
132
- i(childcare::SEND_KIDS_TO_SCHOOL)
133
- d --> h
134
- h --> e
135
- e --> f
136
- f --> g
137
- g --> i
138
- ----
105
+ mermaid::morning_flow2.mmd[format="svg"]
139
106
140
107
Multiple independent components can add actions to the same `flow`. This is the
141
108
power of `flow` services, they can be extended by multiple independent
@@ -161,31 +128,7 @@ all without the `MorningRoutine` source code having known about the new
161
128
functionality. We can mix and match new components without modifying the
162
129
original source code.
163
130
164
- [mermaid, format="svg"]
165
- ----
166
- flowchart TD
167
- a(WAKE_UP)
168
- b(selfcare::SHOWER)
169
- c(selfcare::GET_DRESSED)
170
- d(food::MAKE_COFFEE)
171
- e(food::DRINK_COFFEE)
172
- a --> b
173
- b --> c
174
- c --> d
175
- d --> e
176
- f(food::MAKE_BREAKFAST)
177
- g(food::EAT_BREAKFAST)
178
- h(childcare::PACK_SCHOOL_LUNCHES)
179
- i(childcare::SEND_KIDS_TO_SCHOOL)
180
- d --> h
181
- h --> e
182
- e --> f
183
- f --> g
184
- g --> i
185
- j(exercise::RIDE_STATIONARY_BIKE)
186
- a --> j
187
- j --> b
188
- ----
131
+ mermaid::morning_flow3.mmd[format="svg"]
189
132
190
133
The `cib` library will take care of initializing and building all services,
191
134
including `flow` services. For `flow`s, this means the dependency graph will be
0 commit comments