diff --git a/core/workflow/callrole.go b/core/workflow/callrole.go index 8519cec1..adb4ba56 100644 --- a/core/workflow/callrole.go +++ b/core/workflow/callrole.go @@ -222,7 +222,10 @@ func (t *callRole) updateState(s task.State) { log.WithField("role", t.Name).WithField("state", s.String()).Trace("updating state") t.state.merge(s, t) t.SendEvent(&event.RoleEvent{Name: t.Name, State: t.state.get().String(), RolePath: t.GetPath()}) - t.parent.updateState(s) + + if t.Critical == true || s != task.ERROR { + t.parent.updateState(s) + } } func (t *callRole) copy() copyable { diff --git a/core/workflow/taskrole.go b/core/workflow/taskrole.go index b7b449a0..f48afad2 100644 --- a/core/workflow/taskrole.go +++ b/core/workflow/taskrole.go @@ -226,7 +226,10 @@ func (t *taskRole) updateState(s task.State) { log.WithField("role", t.Name).WithField("state", s.String()).Trace("updating state") t.state.merge(s, t) t.SendEvent(&event.RoleEvent{Name: t.Name, State: t.state.get().String(), RolePath: t.GetPath()}) - t.parent.updateState(s) + + if t.Critical == true || s != task.ERROR { + t.parent.updateState(s) + } } func (t *taskRole) SetTask(taskPtr *task.Task) {