Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions flows/engine/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ func (s *session) continueUntilWait(sprint flows.Sprint, currentRun flows.FlowRu
childRun := currentRun
currentRun = parentRun

// can't resume into a run with a missing flow
if currentRun.Flow() == nil {
return errors.New("can't resume parent run with missing flow asset")
}

// as long as we didn't error, 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 {
return errors.New("can't resume parent run with missing flow asset")
}

if destination, err = s.findResumeDestination(sprint, currentRun, false); err != nil {
failure(sprint, currentRun, step, errors.Wrapf(err, "can't resume run as node no longer exists"))
}
Expand Down
4 changes: 2 additions & 2 deletions flows/runs/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ func (r *flowRun) CreateStep(node flows.Node) flows.Step {
}

func (r *flowRun) PathLocation() (flows.Step, flows.Node, error) {
if r.Path() == nil {
if len(r.path) == 0 {
return nil, nil, errors.Errorf("run has no location as path is empty")
}

step := r.Path()[len(r.Path())-1]
step := r.path[len(r.path)-1]

// check that we still have a node for this step
node := r.Flow().GetNode(step.NodeUUID())
Expand Down