147
}
148
150
>
151
>
// we don't care about the root here which is the entire mutable state
152
>
incomingHSM, err := hsm.NewRoot(
153
>
r.shardContext.StateMachineRegistry(),
154
>
workflow.StateMachineType,
155
>
mutableState,
156
>
request.StateMachineNode.Children,
157
>
mutableState,
158
>
)
159
>
if err != nil {
160
return false, err
161
}
162
164
>
if err := incomingHSM.Walk(func(incomingNode *hsm.Node) error {
165
>
166
>
if incomingNode.Parent == nil {
167
>
// skip root which is the entire mutable state
168
>
return nil
169
>
}
170
172
>
currentNode, err := currentHSM.Child(incomingNodePath)
173
>
if err != nil {
174
// The node may not be found if the state machine was deleted in terminal a state and this cluster is
175
// syncing from an older cluster that doesn't delete the state machine on completion.