Skip to content

Comments

[Fix-17597][Workflow] fix condition task node not run when predecessor node failed#17599

Closed
Mrhs121 wants to merge 1 commit intoapache:devfrom
Mrhs121:Fix-17597
Closed

[Fix-17597][Workflow] fix condition task node not run when predecessor node failed#17599
Mrhs121 wants to merge 1 commit intoapache:devfrom
Mrhs121:Fix-17597

Conversation

@Mrhs121
Copy link
Contributor

@Mrhs121 Mrhs121 commented Oct 24, 2025

…r node failed

Purpose of the pull request

close #17597

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 to docs/docs/en/guide/upgrade/incompatible.md

@Mrhs121
Copy link
Contributor Author

Mrhs121 commented Oct 24, 2025

@ruanwenjun cc, please help review it when you have time, thank you.

@ruanwenjun
Copy link
Member

This is caused by the judge logic of IWorkflowExecutionGraph#isEndOfTaskChain is incorrect.

@Mrhs121
Copy link
Contributor Author

Mrhs121 commented Oct 24, 2025

This is caused by the judge logic of IWorkflowExecutionGraph#isEndOfTaskChain is incorrect.

The judgment logic in the isTriggerConditionMet method also has the same problem. If the predecessor node that the condition node depends on fails, it will return early.

protected void triggerTasks(final IWorkflowExecutionRunnable workflowExecutionRunnable,
final List<ITaskExecutionRunnable> taskExecutionRunnables) {
final IWorkflowExecutionGraph workflowExecutionGraph = workflowExecutionRunnable.getWorkflowExecutionGraph();
final List<ITaskExecutionRunnable> readyTaskExecutionRunnableList = taskExecutionRunnables
.stream()
.filter(workflowExecutionGraph::isTriggerConditionMet)
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(readyTaskExecutionRunnableList)) {
emitWorkflowFinishedEventIfApplicable(workflowExecutionRunnable);
return;
}

@ruanwenjun
Copy link
Member

duplicated with #17606

@ruanwenjun ruanwenjun added duplicate This issue or pull request already exists bug Something isn't working labels Oct 28, 2025
@Mrhs121 Mrhs121 closed this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [workflow] version 3.3.1 condition task node not run when parent node failed

2 participants