Camunda BPM Job keeps disappearing randomly

Any Camunda BPM experts here? I’ve been dealing with this issue for quiet a while now and I’m not sure where to find any details at all about what happened to the scheduled jobs in Camunda. Here’s a query to pull in job details for a given process instance id:

...
Job timerJob = managementService.createJobQuery().processInstanceId(processId)
                .activityId(REVIEW_TIMER_ACTIVITY_NAME).active().singleResult();
...

Can anyone help understand how to look for logs of a given process instance? I’ve tried exploring it via database tables but it’s a complete mess. The Camunda dashboard as well is very hard to nevigate and understand what’s going on. The documentation is way too elaborate to find an answer for the simplest questions. Kindly help debug the issue.

Yes! loads!

Did the database schema docs not help? Let me know what you think is missing

The important thing to understand is that when it comes to processes camunda has two sets of table.
One for currently running processes which are prefixed with ACT_RU_ and another set of table for everything that has been completed i.e., the history tables, prefeixed with ACT_HI_

Once a job, activity or process instance has finished it’s deleted from the runtime tables, but will remain in the histroy tables by default until explicitly deleted.

From and API perspective if you want to access completed job details you can do that by asking the history service for the job log (here’s the REST example)