diff --git a/flows/engine/session.go b/flows/engine/session.go index d1b5634f7..20645c12d 100644 --- a/flows/engine/session.go +++ b/flows/engine/session.go @@ -338,7 +338,7 @@ func (s *session) continueUntilWait(sprint flows.Sprint, currentRun flows.FlowRu childRun := currentRun currentRun = parentRun - // as long as we didn't error, we can try to resume it + // as long as we didn't fail, we can try to resume it if childRun.Status() != flows.RunStatusFailed { // if flow for this run is a missing asset, we have a problem if currentRun.Flow() == nil { @@ -349,7 +349,7 @@ func (s *session) continueUntilWait(sprint flows.Sprint, currentRun flows.FlowRu failure(sprint, currentRun, step, errors.Wrapf(err, "can't resume run as node no longer exists")) } } else { - // if we did error then that needs to bubble back up through the run hierarchy + // if we did fail then that needs to bubble back up through the run hierarchy step, _, _ := currentRun.PathLocation() failure(sprint, currentRun, step, errors.Errorf("child run for flow '%s' ended in error, ending execution", childRun.Flow().UUID())) } diff --git a/flows/runs/run.go b/flows/runs/run.go index f0e3cef59..6f485ca65 100644 --- a/flows/runs/run.go +++ b/flows/runs/run.go @@ -187,7 +187,10 @@ func (r *flowRun) PathLocation() (flows.Step, flows.Node, error) { step := r.Path()[len(r.Path())-1] // check that we still have a node for this step - node := r.Flow().GetNode(step.NodeUUID()) + var node flows.Node + if r.Flow() != nil { + node = r.Flow().GetNode(step.NodeUUID()) + } if node == nil { return nil, nil, errors.Errorf("run is located at a flow node that no longer exists") }