Hi,
I posted a feature request to the Camuna Jira and was redirected to repost it here to discuss it.
This is the request.
I also just realized that the text is not clear enough. From my observation the jobHandlerConfiguration field in JobEntity represents the Id of the timer if the job is for a timer. I think that this is not difficult to implement into Camunda and I should be able to do it without problems. However, I wanted to ask about the use case of it and whether you think that it is useful to have something like that.
I would appreciate the feedback.
Here is also the text:
I have a proposal feature for the engine, I couldn't find if it has been already proposed or discussed. Let me know what you think.
I think that this can be easily implemented with only adding a new function to the JobQuery interface, and adding another condition in the named query 'selectJobByQueryCriteriaSql' in Job.xml.
There is still a way to get the Job for a timerId and it looks like this:
ProcessInstance processInstance = processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
JobDefinition jobDefinition = managementService.createJobDefinitionQuery().processDefinitionId(processInstance.getProcessDefinitionId()).activityIdIn(timerId).singleResult();
Job job = managementService.createJobQuery().processInstanceId(processInstanceId).jobDefinitionId(jobDefinition.getId()).singleResult();