jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-40161] Allow StepExecution.onResume to throw Exception

Open
#367 4 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin component:workflow-api-plugin component:workflow-basic-steps-plugin component:workflow-step-api-plugin imported-jira-issue priority:minor resolution:unresolved robustness
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Proposal:

Change onResume to throw Exception. (Would still be binary-compatible.) FlowExecutionList.ItemListenerImpl.onLoaded would then need to catch exceptions and call StepContext.onFailure. Like AbstractStepExecutionImpl, this would rely on transient fields holding the contextual object; the improvement would be that a failure in StepContext.get would stop anything else in onResume (such as the setupTimer methods in TimeoutStepExecution, SleepStep.Execution, or DurableTaskStep.Execution) from running.

---
Originally reported by jglick, imported from: Allow StepExecution.onResume to throw Exception


  • status: Open
  • priority: Minor
  • component(s): durable-task-plugin, workflow-api-plugin, workflow-basic-steps-plugin, workflow-step-api-plugin
  • label(s): api, robustness
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-09

Raw content of original issue

Proposal:

Change onResume to throw Exception. (Would still be binary-compatible.) FlowExecutionList.ItemListenerImpl.onLoaded would then need to catch exceptions and call StepContext.onFailure. Like AbstractStepExecutionImpl, this would rely on transient fields holding the contextual object; the improvement would be that a failure in StepContext.get would stop anything else in onResume (such as the setupTimer methods in TimeoutStepExecution, SleepStep.Execution, or DurableTaskStep.Execution) from running.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.