Skip to content

Commit ca44184

Browse files
committed
rollbackToSavePoint() improved.
1 parent c26d5e1 commit ca44184

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

engine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func (engine *Engine) handleStepFailure(
422422
// Try to rollback to save point before handling failure
423423
def, err := engine.store.GetWorkflowDefinition(ctx, instance.WorkflowID)
424424
if err == nil {
425-
if rollbackErr := engine.rollbackToSavePoint(ctx, instance.ID, step, def); rollbackErr != nil {
425+
if rollbackErr := engine.rollbackToSavePointOrRoot(ctx, instance.ID, step, def); rollbackErr != nil {
426426
// Log rollback error but continue with failure handling
427427
_ = engine.store.LogEvent(ctx, instance.ID, &step.ID, EventStepFailed, map[string]any{
428428
KeyStepName: step.StepName,
@@ -682,7 +682,7 @@ func (engine *Engine) validateDefinition(def *WorkflowDefinition) error {
682682
return nil
683683
}
684684

685-
func (engine *Engine) rollbackToSavePoint(
685+
func (engine *Engine) rollbackToSavePointOrRoot(
686686
ctx context.Context,
687687
instanceID int64,
688688
failedStep *WorkflowStep,

0 commit comments

Comments
 (0)