spring-projects / spring-projects/spring-batch

FlowJob implementation doesn't set the exception message in JobExecution.ExitStatus.ExitDescription when exception is thrown

Open
#3,740 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: core related-to: flow-definition type: bug
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

Whenever occurs an exception in a standard spring batch program (using simple steps without using flows), the exception message is set in JobExecution.ExitStatus.ExitDescription; however when spring batch work with Flows, the ExitDescription is not set.
As far as I have seen org.springframework.batch.core.job.flow.FlowJob implementation doesn't update the JobExecutionStatus with an exit description in org.springframework.batch.core.job.flow.JobFlowExecutor.updateJobExecutionStatus(FlowExecutionStatus status), it just set the exit status, meanwhile org.springframework.batch.core.job.SimpleJob implementation does it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.springframework.batch.core.job.flow.FlowJob and the JobFlowExecutor.updateJobExecutionStatus(FlowExecutionStatus status) method, then compare it with the corresponding handling in org.springframework.batch.core.job.SimpleJob. Trace how an exception in a flow reaches JobExecution and verify that ExitStatus.ExitDescription contains the exception message when the work is done.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.