jstastny-cz commented on code in PR #2301:
URL: 
https://github.com/apache/incubator-kie-kogito-apps/pull/2301#discussion_r2797305979


##########
jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/impl/VertxJobScheduler.java:
##########
@@ -407,6 +417,14 @@ public JobTimeoutExecution call() throws Exception {
                 } catch (Exception exception) {
                     LOG.trace("Timeout {} with jobId {} will be retried if 
possible", timerId, jobId, exception);
                     JobDetails nextJobDetails = computeRetryIfAny(jobDetails);
+
+                    // Extract and set exception details AFTER 
computeRetryIfAny but BEFORE persistence
+                    // Note: computeRetryIfAny creates a new JobDetails 
object, so we must set exception details after it
+                    JobExecutionExceptionDetails exceptionDetails = 
extractExceptionDetails(exception);
+                    if (exceptionDetails != null) {
+                        nextJobDetails.setExceptionDetails(exceptionDetails);

Review Comment:
   I think this is now solved by explicitly setting the fields to null in doRun 
method - if it fails again eventually, the details will be again present in 
RETRY and ERROR states. If after RETRY the execution succeeds, the fields will 
be reset again, because the execution goes through RUNNING state again, which 
is done using the doRun method.



-- 
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