pefernan opened a new issue, #7189:
URL: https://github.com/apache/incubator-kie/issues/7189
### Describe the bug
**Description**
When a message reaches `ProcessEventDispatcher` and no target process
instance is resolved, the dispatcher falls through to its final branch and
sends a process-level signal with `process.send(...)`. That call runs outside a
Unit of Work (UoW).
The correlated catch event still fires and the instance state is persisted.
But `UnitOfWorkProcessEventListener` has no active UoW to intercept the events.
`DefaultUnitOfWorkManager` then falls back to `PassThroughUnitOfWork`, which
discards them. As a result, no DataEvents (process, node or variable) are
published for these executions.
This is the only production caller of Process.send. Every other dispatcher
branch goes through `ProcessServiceImpl`, which wraps the work in a UoW.
**Steps to reproduce**
- Deploy a process with an intermediate catch message event that uses a
correlation key. It could be a catch event inside a subprocess.
- Send a Kafka message whose payload carries the correlation key and matches
no existing target instance reference.
- Observe that the catch event fires and the instance progresses.
- Observe that no DataEvents are published.
- Expected behavior
- Handling the signal publishes the same DataEvents as any other signal path
(`ProcessServiceImpl.signalProcessInstance`, for example).
**Actual behavior**
The signal is processed and persisted, but the events are dropped because no
UoW is active.
**Root cause**
`ProcessEventDispatcher.dispatch` calls
`process.send(SignalFactory.of("Message-" + trigger, data))` directly.
AbstractProcess.send goes straight to the process runtime without starting a
UoW.
**Proposed fix**
- Add `ProcessService.signalProcess(Process<T> process, Object data, String
signalName)`.
- Implement it in `ProcessServiceImpl` inside
`UnitOfWorkExecutor.executeInUnitOfWork(...)`.
- Make the dispatcher call `processService.signalProcess(...)` instead of
`process.send(...)`.
### 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]