cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to figure which processDefinition a job will execute

rgareau
Champ in-the-making
Champ in-the-making
Hi, can someone tell me where I can get which process definition a job will execute.

Here is what I do.
I create a JobQuery with the managementService
List<Job> list = managementService.createJobQuery().orderByJobDuedate().asc().list();

But when I look a the individual Job instance in the list I have no way of knowing which process instance is referred by each job.
All I have is
id
duedate
exceptionMessage
executionId
processInstanceId
retries

So when a job is not currently executing executionId and processInstanceId are null! 

So how am I supposed to know which processDefinition it is referencing?

Thanks
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
A job as a (type-specific) HANDLER_CFG_ field. This contains all relevant information for the job to execute. Normally, at least the process-instance ID should be available if the job is related to a process, regardless if it's currently running or not…