18.10.2 Investigating Background Process Errors
Investigate failed background jobs by reviewing their debug trace logs and error details.
When a background job encounters an unexpected error, start with the Debug Viewer page's Session tab. Set View to Background Executions and click (Set). Then filter for jobs with a Failed status as shown below.
Figure 18-23 Viewing Failed Background Execution Jobs
Then, on the Debug tab sort descending by Timestamp and drill into the debug trace log for the candidate process as shown below.
Figure 18-24 Identifying the Debug Trace Log for the Background Job
Any errors that occurred show as red dots on the debug trace timeline. As shown below, click the first red dot to jump to the relevant part of the debug trace log.
Figure 18-25 Jumping to First Error in the Debug Trace Timeline
Review the error information. As shown below, the stack trace helps you see that line 43 of the EBA_DEMO_WOODSHR_REWARD package encountered a NO_DATA_FOUND exception during the execution of the Invoke API that calls PREDICT_AWARD_QUALIFICATION. With this info, you can more quickly identify the cause in your code.
When needed, you can enable debug mode and add additional APEX_DEBUG.INFO debugging messages into your code to add extra debugging context information to the logs to further narrow down the culprit.
Figure 18-26 Investigating Details of a Background Job in FAILED State
Parent topic: Debugging Background Processes



