Skip to content

#337 - StopTask: make the process fail for real - #338

Open
njoubert-cleverage wants to merge 1 commit into
mainfrom
337
Open

njoubert-cleverage wants to merge 1 commit into
mainfrom
337

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #337.

  • StopTask stops its state with a new ProcessStoppedException::createByTask() ("Process X has been stopped by task Y."): the process manager throws a ProcessFailedException, as for the stop error strategy and the stop checkers. The process really fails: cleverage_process.fail event, no finalization, non-zero exit code of cleverage:process:execute, failure of the process_executor task of a parent process (handled by its error_strategy).
  • Documentation: stop_task.md (how the process fails, alternatives to end a flow without failure), 04-advanced_workflow.md, 01-process_definition.md (failed_level), 02-task_types.md (finalization).
  • Tests: StopTaskTest, ProcessManagerEndLogTest.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

Behaviour change: a process using the stop task now fails (exception, non-zero exit code, no finalization) instead of ending normally with a history flagged as failed. This is what the task documented; processes using stop to end a flow without failure must filter their items instead. To be mentioned in the UPGRADE.md section of the release.

🤖 Generated with Claude Code

…ask stops its state with a ProcessStoppedException, so that the process manager throws a ProcessFailedException (fail event, non-zero exit code, failure of the parent process_executor task). Update documentation and tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StopTask: the process is marked as failed but does not fail (exit code 0, parent process goes on)

1 participant