Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the workflow fail based on a metadata key #3475

Closed
rgolangh opened this issue Apr 18, 2024 · 0 comments · Fixed by #3491
Closed

Make the workflow fail based on a metadata key #3475

rgolangh opened this issue Apr 18, 2024 · 0 comments · Fixed by #3491
Assignees

Comments

@rgolangh
Copy link

Description

There is no way to set a workflow status on end to a status different than completed. While the workflow completed its steps we don't have a way to say that the step results are unexpected and the workflow actually failed. From an API point of view there's no way to tell if a workflow REALLY did the work it supposed to do.

Implementation ideas

after a discussion with @fjtirado we have formed this suggestion:

states:
  name: endWithError
  metadata:
     errorMessage: '.somekey'
  end: true

The runtime will seek a metadata key errorMessage and if it is not empty then it will set the status of the instance to failed
The advantage is that we don't add new keywords or change the spec, or add custom actions or other workarounds, so this syntax is available ootb for every workflow developer out there.

@fjtirado fjtirado self-assigned this Apr 19, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 30, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 30, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 30, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 30, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 30, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 30, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue May 3, 2024
fjtirado added a commit that referenced this issue May 3, 2024
* [Fix #3475] Parsing the errorMessage metadata keys in end nodes

* [Fix #3475] Do not abort process instance

* [Fix #3475] Adding IT test
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this issue May 7, 2024
…apache#3491)

* [Fix apache#3475] Parsing the errorMessage metadata keys in end nodes

* [Fix apache#3475] Do not abort process instance

* [Fix apache#3475] Adding IT test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants