martinweiler opened a new issue, #7275: URL: https://github.com/apache/incubator-kie/issues/7275
### Describe the bug Node events (`ENTER`, `EXIT`, `ABORTED`, etc.) of nodes that complete synchronously inside their trigger carry the same timestamp, even when the node took a long time to execute. ### Expected behavior The data-audit log shows the correct ENTER and EXIT timestamps, eg: ``` "2026-11-06 15:43:17.424" "ENTER" ... "Rest1" "WorkItemNode" "2026-11-06 15:43:37.424" "EXIT" ... "Rest1" "WorkItemNode" ``` ### Actual behavior The data-audit log shows both events at the same time: ``` "2026-11-06 15:43:37.424" "ENTER" ... "Rest1" "WorkItemNode" "2026-11-06 15:43:37.424" "EXIT" ... "Rest1" "WorkItemNode" ``` ### How to Reproduce? **Reproducer:** a process with a `Rest` work item node whose endpoint takes 20 seconds to respond. The script logs show the correct times: ``` 15:43:17 - Rest1 started 15:43:37 - Rest1 exit ``` The data-audit log shows both events at the same time: ``` "2026-11-06 15:43:37.424" "ENTER" ... "Rest1" "WorkItemNode" "2026-11-06 15:43:37.424" "EXIT" ... "Rest1" "WorkItemNode" ``` ### 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 **Root cause** - `UnitOfWorkProcessEventListener` records node events in `afterNodeTriggered` and `afterNodeLeft`. For `ENTER`, that happens only after `internalTrigger(...)` returns. - `AbstractDataEventAdapter.toProcessInstanceNodeEvent(...)` stamps the event body `eventDate` with `new Date()`. - It does not set the CloudEvent `time`, so `AbstractDataEvent` defaults it to `now()` when the event is built. - `JPADataAuditStore` persists `event.getTime()` as the event date. - For `WorkItemNodeInstance`, the handler runs inline and blocks inside `internalTrigger`. The `ENTER` event is therefore converted after the node has finished, at the same moment as `EXIT`. - Wait states such as timers and user tasks return from `internalTrigger` almost immediately, so they are not visibly affected. -- 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]
