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

   ### Describe the bug
   
   According to the Serverless Workflow specification, parallel states split 
the execution path into multiple independent ones that run in parallel. 
However, according to the SonataFlow documentation, SonataFlow currently 
serializes its execution, but "**there is no logical dependency between the 
execution of branches**".
   With this in mind, as a developer using SonataFlow, I would expect that the 
data entering a Parallel State would be sent to all its branches, and the 
branches' outputs would not interfere with the execution of the other ones.
   However, that seems not to be the case at the moment.
   
   
   To help reproduce this issue, I created a simple workflow with three 
functions:
   ```
   id: paralllel
   name: paralllel
   version: '0.1.0'
   specVersion: '0.8'
   description: Parallel routing example
   start: entry-event
   
   events:
     - name: triggerEvent
       type: http.request.received
       source: http-event-sources
       kind: consumed
   
   functions:
     - name: function-a
       type: custom
       operation: knative:services.v1.serving.knative.dev/function-a?method=POST
     - name: function-b
       type: custom
       operation: knative:services.v1.serving.knative.dev/function-b?method=POST
     - name: function-c
       type: custom
       operation: knative:services.v1.serving.knative.dev/function-c?method=POST
   
   states:
     - name: entry-event
       type: event
       onEvents:
         - eventRefs:
             - triggerEvent
           actionMode: sequential
           eventDataFilter:
             data: "${ . }"
       transition: function-a
   
     - name: function-a
       type: operation
       actions:
         - functionRef:
             refName: function-a
       transition: parallel
   
     - name: parallel
       type: parallel
       branches:
         - name: branch-b
           actions:
             - functionRef:
                 refName: function-b
         - name: branch-c
           actions:
             - functionRef:
                 refName: function-c
       end: true
   ```
   Furthermore, I have attached three files: `kubernetes.yaml` with the 
definition of these Knative Services, and `kogito.yml` and `knative.yml` that 
create the necessary objects to run the workflow. All container images can be 
accessed publicly. 
   
   These three functions all have the same implementation, where each execution 
reads the request body and adds the hostname to a list of hostnames. Moreover, 
each execution logs the received body.
   The expected behavior would be that `function-b` and `function-c`, although 
being executed sequentially, would receive the exact same body and would log 
something like the following:
   ```
   Received request: [{'hostnames': ['function-a']}]
   ```
   
   In reality, this is only logged in one of these functions. For example, in 
one of my executions, this was the log of `function-b`:
   ```
   Received request: [{'hostnames': ['function-a', 'function-c']}]
   ```
   
   Therefore, although I am creating a Parallel State, the state does not 
execute actions independently.
   
   ### Expected behavior
   
   _No response_
   
   ### Actual behavior
   
   _No response_
   
   ### How to Reproduce?
   
   _No response_
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to