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

Error in workflow not correctly propagated #987

Closed
gabriel-farache opened this issue Mar 4, 2024 · 1 comment · Fixed by apache/incubator-kie-kogito-runtimes#3428 or apache/incubator-kie-kogito-apps#2011
Assignees
Labels
area:engine Related to the runtime engines area:sonataflow Related to CNCF Serverless Workflow Spec and SonataFlow type:bug Something is behaving unexpectedly

Comments

@gabriel-farache
Copy link

gabriel-farache commented Mar 4, 2024

When an error occurs when, for instance, sending REST request using extension, the error is not propagated and the workflow hangs in active state.

extensions:
  - extensionid: workflow-uri-definitions
    definitions:
      notifications: "https://raw.githubusercontent.com/janus-idp/backstage-plugins/%40janus-idp/plugin-notifications-backend%401.0.3/plugins/notifications-backend/src/openapi.yaml"
functions:
  - name: createNotification
    operation: notifications#createNotification

Log:

2024-03-04 14:05:24,282 ERROR [org.jbp.wor.ins.imp.WorkflowProcessInstanceImpl] (executor-thread-4) Unexpected error while executing node createNotification in process instance f53b870e-9d38-4ad4-b499-2d066b84e9b6: org.jbpm.workflow.instance.WorkflowRuntimeException: [MTAAnalysis:f53b870e-9d38-4ad4-b499-2d066b84e9b6 - createNotification:46] -- RESTEASY004655: Unable to invoke request: java.net.UnknownHostException: bckstage-backstage.backstage-system: Name or service not known

Here the error was caused because the host was unknown.

WHen accessing management/processes/ {workflow def id}/instances/{instance id}/error, we have

{"failedNodeId":"_jbpm-unique-38","id":"f53b870e-9d38-4ad4-b499-2d066b84e9b6","message":"java.net.UnknownHostException - bckstage-backstage.backstage-system: Name or service not known"}

And the workflow's state remains active

When sending REST request with specs file located in the workflow, the error seems to be correctly propagated as the workflow's state is set to error

@yesamer yesamer added area:sonataflow Related to CNCF Serverless Workflow Spec and SonataFlow type:bug Something is behaving unexpectedly area:engine Related to the runtime engines labels Mar 5, 2024
@fjtirado fjtirado self-assigned this Mar 5, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/kogito-apps that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Mar 5, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Mar 6, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 6, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 6, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 6, 2024
Although not strictly needed by the PR, for future additions, a new
class in the hierarchy that holds the NodeInstance reference has been
included.
fields has been made final to remark that event objects are inmutable
@yesamer yesamer moved this from 📋 Backlog to 🧐 In Review in 🦉 KIE Podling Board Mar 6, 2024
@github-project-automation github-project-automation bot moved this from 🧐 In Review to 🎯 Done in 🦉 KIE Podling Board Mar 7, 2024
fjtirado added a commit to apache/incubator-kie-kogito-runtimes that referenced this issue Mar 7, 2024
* [Fix apache/incubator-kie-issues#987] New onError event

* [Fix apache/incubator-kie-issues#987] Adding unit test

* [Fix apache/incubator-kie-issues#987] Refactor ProcessNodeEvent children

Although not strictly needed by the PR, for future additions, a new
class in the hierarchy that holds the NodeInstance reference has been
included.
fields has been made final to remark that event objects are inmutable
fjtirado added a commit to apache/incubator-kie-kogito-apps that referenced this issue Mar 7, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 8, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Mar 8, 2024
fjtirado added a commit to apache/incubator-kie-kogito-runtimes that referenced this issue Mar 8, 2024
* [Fix apache/incubator-kie-issues#987] Fix nightly

* Import not sorted preventing green
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this issue Mar 11, 2024
* [Fix apache/incubator-kie-issues#987] New onError event

* [Fix apache/incubator-kie-issues#987] Adding unit test

* [Fix apache/incubator-kie-issues#987] Refactor ProcessNodeEvent children

Although not strictly needed by the PR, for future additions, a new
class in the hierarchy that holds the NodeInstance reference has been
included.
fields has been made final to remark that event objects are inmutable
rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this issue Mar 11, 2024
rgdoliveira pushed a commit to rgdoliveira/kogito-apps that referenced this issue Mar 11, 2024
pefernan pushed a commit to pefernan/kogito-apps that referenced this issue Mar 11, 2024
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 3, 2024
* [Fix apache/incubator-kie-issues#987] New onError event

* [Fix apache/incubator-kie-issues#987] Adding unit test

* [Fix apache/incubator-kie-issues#987] Refactor ProcessNodeEvent children

Although not strictly needed by the PR, for future additions, a new
class in the hierarchy that holds the NodeInstance reference has been
included.
fields has been made final to remark that event objects are inmutable
fjtirado added a commit to fjtirado/kogito-runtimes that referenced this issue Apr 3, 2024
fjtirado added a commit to fjtirado/kogito-apps that referenced this issue Apr 3, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Apr 3, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Apr 5, 2024
fjtirado added a commit to fjtirado/drools that referenced this issue Apr 5, 2024
fjtirado added a commit to kiegroup/drools that referenced this issue Apr 8, 2024
[9.99.x-prod][OSL-1.32.2] [Fix apache/incubator-kie-issues#987] Add onError listener
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:engine Related to the runtime engines area:sonataflow Related to CNCF Serverless Workflow Spec and SonataFlow type:bug Something is behaving unexpectedly
Projects
Archived in project
3 participants