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

   ### Describe the bug
   
   For a node marked `customAsync`, the job that triggers it is recorded with a 
`node_instance_id` that doesn't match any node instance in the process 
instance. It also carries the same value as the `job_id`.
   
   This is a follow-up to an earlier report from 01/2026: jobs were indexed 
under the previous node instance. That behaviour came from 
`nodeInstanceId(from.getStringId())`. Commit `ff5db7b047c` (kie-issues#7162) 
changed it to the id of the virtual instance. The job no longer points at the 
wrong node, but it now points at an id that exists nowhere else.
   
   **Root cause**
   
   In `AsyncEventNodeInstance`:
   - `internalTrigger` sets `jobId = getStringId()`. It also uses 
`this.getStringId()` as the job's `nodeInstanceId`.
   - The wrapper node is `hidden`, so it never produces node events or a 
nodes-table row.
   - `triggerCompleted()` removes the wrapper and creates the real node 
instance with a new random UUID. The id the job recorded therefore never 
appears in any node event.
   
   
   
   ### Expected behavior
   
   | Node | job_id | node_instance_id (job log and node log) |
   |---|---|---|
   | Timer | `2a8d52a3…` | `01173303…` |
   | Rest2 | `3efc8221…` | `e93f345d…` |
   | Rest1 | `b2ed4160…` | `d0b914e8…` |
   
   The job's `node_instance_id` matches the node log, and every job has a 
distinct `job_id`. 
   
   ### Actual behavior
   
   **Observed (data-audit, before the fix)**
   ```
   job_execution_log:  job_id = c2f2c4ee-…   node_instance_id = c2f2c4ee-…   
(async Rest1)
   job_execution_log:  job_id = 6fb7bd4c-…   node_instance_id = 6fd0cb63-…   
(Timer, correct)
   process_instance_node_log: no row with node_instance_id c2f2c4ee-…
   ```
   A consumer can't join an async job to the node it triggered.
   
   
   ### 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