You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gabriel-farache (via GitHub)" <gi...@apache.org> on 2024/08/14 12:33:53 UTC

[I] Wrong response returned when executing workflow [incubator-kie-kogito-runtimes]

gabriel-farache opened a new issue, #3620:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3620

   ### Describe the bug
   
   When a workflow fails at its 1st state, the response return by the execution endpoint is wrong: it only contains an error message but it does not contains the instance ID.
   
   ### Expected behavior
   
   Response should look like
   ```
   {
     "id":"{{ UUID }} ",
     "workflowdata": {{ workflowdata object }} 
   }
   ```
   
   ### Actual behavior
   
   The response is similar to
   ```
   {"details":"Error id 98c2edd7-24e6-4cfc-a197-36d10cb9eb41-2","stack":""}
   ```
   
   ### How to Reproduce?
   
   Execute a workflow that fails at the 1st step, i.e: send an http request to a non-existent endpoint
   
   ### Output of `uname -a` or `ver`
   
   _No response_
   
   ### Output of `java -version`
   
   _No response_
   
   ### GraalVM version (if different from Java)
   
   _No response_
   
   ### Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)
   
   _No response_
   
   ### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Wrong response returned when executing workflow [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado closed issue #3620: Wrong response returned when executing workflow
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3620


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Wrong response returned when executing workflow [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3620:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3620#issuecomment-2289067744

   This was fixed with https://github.com/apache/incubator-kie-kogito-runtimes/pull/3461


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Wrong response returned when executing workflow [incubator-kie-kogito-runtimes]

Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #3620:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3620#issuecomment-2288722679

   @fjtirado Sure: https://github.com/parodos-dev/serverless-workflows/blob/main/mta-v7.x/mta.sw.yaml
   
   And yes, the 1st call returns a 404 when something is not correctly configured for instance


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Wrong response returned when executing workflow [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3620:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3620#issuecomment-2288716137

   @gabriel-farache Im not sure it will happen with any workflow. From your description it seems it happens when the first action of the workflow is an http one that fails with a 404?
   It would be nice to see the worklow that has this behaviour


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Wrong response returned when executing workflow [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3620:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3620#issuecomment-2288968841

   Hmmm, I tested this workflow (first operation is a rest call)
   
   ```
   {
     "id": "fahrenheit_to_celsius",
     "name": "Fahrenheit to Celsius Conversion Flow",
     "version": "v1.0",
     "start": "Computation",
     "functions": [
       {
         "name": "multiplication",
         "operation": "multiplication/spec.yaml#doOperation"
       },
       {
         "name": "subtraction",
         "operation": "subtraction/spec.yaml#doOperation"
       }
     ],
     "states": [
       {
         "name": "Computation",
         "actionMode": "sequential",
         "type": "operation",
         "actions": [
           {
             "name": "subtract",
             "functionRef": {
               "refName": "subtraction",
               "arguments": {
                 "leftElement": ".fahrenheit", 
                 "rightElement": 32 
               }
             }
           },
           {
             "name": "multiply",
             "functionRef": {
               "refName": "multiplication",
               "arguments":  "{ leftElement: .difference, rightElement: 0.5556 }"
             }
           }
         ],
         "end": true
       }
     ]
   }
   ```
   
   And when the rest service is not there, I got as response
   ```
   
   {
       "failedNodeId": "6",
       "id": "c14b40be-1214-4168-9fe6-e22fc10566a9",
       "message": "org.kie.kogito.process.workitem.WorkItemExecutionException - Unknown error, status code 404"
   }
   ```
   
   In the stack trace it can be seen
   ```
   
   
   org.jbpm.workflow.instance.WorkflowRuntimeException: [fahrenheit_to_celsius:c14b40be-1214-4168-9fe6-e22fc10566a9 - subtraction:[uuid=6]] -- Unknown error, status code 404
   	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.getExceptionScopeInstance(WorkItemNodeInstance.java:211)
   	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.handleException(WorkItemNodeInstance.java:205)
   	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.processWorkItemHandler(WorkItemNodeInstance.java:195)
   	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:169)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:246)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:458)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:443)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:413)
   	at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:76)
   	at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:55)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:246)
   	at org.jbpm.workflow.instance.node.CompositeNodeInstance.internalTrigger(CompositeNodeInstance.java:146)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:246)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:458)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:443)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:413)
   	at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:76)
   	at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:55)
   	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:246)
   	at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:39)
   	at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:276)
   	at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:518)
   	at org.jbpm.process.instance.KogitoProcessRuntimeImpl.startProcessInstance(KogitoProcessRuntimeImpl.java:167)
   	at org.jbpm.process.instance.KogitoProcessRuntimeImpl.startProcessInstance(KogitoProcessRuntimeImpl.java:76)
   	at org.kie.kogito.process.impl.AbstractProcessInstance.start(AbstractProcessInstance.java:288)
   	at org.kie.kogito.process.impl.AbstractProcessInstance.start(AbstractProcessInstance.java:260)
   	at org.kie.kogito.process.impl.ProcessServiceImpl.lambda$createProcessInstance$0(ProcessServiceImpl.java:75)
   	at org.kie.kogito.services.uow.UnitOfWorkExecutor.executeInUnitOfWork(UnitOfWorkExecutor.java:40)
   	at org.kie.kogito.process.impl.ProcessServiceImpl.createProcessInstance(ProcessServiceImpl.java:70)
   	at org.kie.kogito.serverless.Fahrenheit_to_celsiusResource.createResource_fahrenheit_to_celsius(Fahrenheit_to_celsiusResource.java:82)
   	at org.kie.kogito.serverless.Fahrenheit_to_celsiusResource_ClientProxy.createResource_fahrenheit_to_celsius(Unknown Source)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
   	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
   	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:118)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:560)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:452)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:413)
   	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:415)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:378)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:356)
   	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:70)
   	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:429)
   	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:240)
   	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)
   	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
   	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:157)
   	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:229)
   	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:82)
   	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:147)
   	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:93)
   	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
   	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
   	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.base/java.lang.Thread.run(Thread.java:840)
   Caused by: WorkItemExecutionError [errorCode=404]
   	at org.kie.kogito.serverless.workflow.openapi.OpenApiWorkItemHandler.internalExecute(OpenApiWorkItemHandler.java:57)
   	at org.kie.kogito.serverless.workflow.WorkflowWorkItemHandler.executeWorkItem(WorkflowWorkItemHandler.java:42)
   	at org.kie.kogito.app.Subtractionspec_doOperation_ClientProxy.executeWorkItem(Unknown Source)
   	at org.jbpm.process.instance.LightWorkItemManager.internalExecuteWorkItem(LightWorkItemManager.java:80)
   	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.lambda$internalTrigger$0(WorkItemNodeInstance.java:170)
   	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.processWorkItemHandler(WorkItemNodeInstance.java:183)
   	... 58 more
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org