Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Fix-17732] Change workflow instance status to failure when command handle failed#17745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ruanwenjun wants to merge4 commits intoapache:dev
base:dev
Choose a base branch
Loading
fromruanwenjun:dev_wenjun_changeWorkflowInstanceStateToFailure

Conversation

@ruanwenjun
Copy link
Member

@ruanwenjunruanwenjun commentedNov 27, 2025
edited by SbloodyS
Loading

Purpose of the pull request

fix#17732

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as(please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it todocs/docs/en/guide/upgrade/incompatible.md

Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull request overview

This PR addresses issue#17732 by ensuring that workflow instance status is set to FAILURE when command handling fails during bootstrap. The changes introduce proper error handling and state management when command processing encounters exceptions, preventing workflow instances from being stuck in intermediate states.

Key Changes:

  • Adds workflow instance state update to FAILURE in error handling path
  • Makes error command movement transactional to ensure atomicity
  • Enhances WorkflowGraph with duplicate task name/code validation

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
CommandEngine.javaAdds logic to force update workflow instance state to FAILURE when command bootstrap fails, plus enhanced logging
CommandServiceImpl.javaAdds@transactional annotation to ensure atomic error command insertion and command deletion
WorkflowGraph.javaReplaces stream-based map creation with explicit loop to add duplicate task name/code validation
WorkflowInstanceDao.javaAdds interface method for force updating workflow instance state without origin state check
WorkflowInstanceDaoImpl.javaImplements force update method delegating to mapper
WorkflowInstanceMapper.javaAdds mapper method signature for force state update
WorkflowInstanceMapper.xmlAdds SQL update statement that updates state without checking current state

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@ruanwenjunruanwenjunforce-pushed thedev_wenjun_changeWorkflowInstanceStateToFailure branch from7da42ef toe248fddCompareNovember 27, 2025 12:25
@ruanwenjunruanwenjunforce-pushed thedev_wenjun_changeWorkflowInstanceStateToFailure branch frome248fdd to6ef9e79CompareNovember 27, 2025 12:31
zhongjiajie
zhongjiajie previously approved these changesNov 27, 2025
SbloodyS
SbloodyS previously approved these changesNov 27, 2025
@ruanwenjunruanwenjunforce-pushed thedev_wenjun_changeWorkflowInstanceStateToFailure branch from6ef9e79 to82533fbCompareNovember 27, 2025 15:06
SbloodyS
SbloodyS previously approved these changesNov 28, 2025
@ruanwenjunruanwenjunforce-pushed thedev_wenjun_changeWorkflowInstanceStateToFailure branch from82533fb to6f87cebCompareNovember 28, 2025 07:27
@sonarqubecloud
Copy link

Quality Gate FailedQuality Gate failed

Failed conditions
43.8% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

@ruanwenjunruanwenjunforce-pushed thedev_wenjun_changeWorkflowInstanceStateToFailure branch 2 times, most recently from64d8d0e tocf58747CompareNovember 29, 2025 07:39
@ruanwenjunruanwenjunforce-pushed thedev_wenjun_changeWorkflowInstanceStateToFailure branch fromcf58747 toa5ae49aCompareNovember 29, 2025 07:40
@sonarqubecloud
Copy link

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@SbloodySSbloodySSbloodyS left review comments

@caishunfengcaishunfengAwaiting requested review from caishunfengcaishunfeng is a code owner

@zhongjiajiezhongjiajieAwaiting requested review from zhongjiajie

At least 2 approving reviews are required to merge this pull request.

Assignees

@ruanwenjunruanwenjun

Labels

backendbugSomething isn't workingtest

Projects

None yet

Milestone

3.4.0

Development

Successfully merging this pull request may close these issues.

[Bug] Task hanged in submitted

3 participants

@ruanwenjun@zhongjiajie@SbloodyS

[8]ページ先頭

©2009-2025 Movatter.jp