pefernan opened a new issue, #7203:
URL: https://github.com/apache/incubator-kie/issues/7203

   ### Describe the bug
   
   In BPMN processes, multiple User Task nodes frequently share the same 
TaskName (e.g. multiple approval tasks in different branches or rework loops). 
Currently, code generation produces a distinct TaskInput, TaskOutput, and 
TaskModel per node ID, and registers duplicate REST endpoints mapped to the 
same HTTP path (/{id}/{taskName}/{taskId}).
   
   This causes several issues:
   
   - **Spring Boot**: Fails at startup with `BeanCreationException` due to 
ambiguous `RequestMapping` paths.
   - **Quarkus / RESTEasy**: Registers duplicate paths and arbitrarily routes 
to the first registered endpoint method. If different nodes have different 
variables, data is dropped on deserialization.
   - **OpenAPI / JSON Schema**: Generates multiple conflicting schemas for the 
same REST path.
   
   **Proposed Solution**
   
   1. **Aggregate User Tasks by `TaskName`:**
   - Group `HumanTaskNode` definitions by TaskName into a single unified task 
model per process.
   - Union and merge input/output parameters across all nodes sharing the same 
task name.
   - Fail fast during code generation (IllegalArgumentException) if nodes 
sharing a task name define conflicting variable types.
   - Non-human work items (service tasks, custom work items) remain separated 
per node ID.
   
   2. Unified REST Endpoints:
   - Generate a single set of REST endpoints per TaskName 
(/{id}/{taskName}/{taskId}) without numeric index suffixes on method names.
   
   3. **Synchronize Task Outputs on WorkItem Completion:**
   - Ensure completion via the process WorkItem API propagates output data to 
the underlying `UserTaskInstance` so that task event listeners and downstream 
consumers receive the output payload.
   
   ### 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