Accessing timer instance

Hello,
I have two processes one main process and one sub-process,
and I have implemented them in below manner

  1. calling sub-process in main process through call-activity
  2. call activity have two boundary events, due date timer and followup timer

I want update these timer with new date at run time,so how can i get details of process instance and timer instance.
Please help.

Thanks,
Anjumaara

Hi Anjumaara,

a timer is represented by a job entry. You can use the ManagementService or Rest API to update the due date of the timer’s job.
If this is part of the regular process then you should think about to model this aspect in the process.

Does this help you?

Best regards,
Philipp

1 Like

Hi Philipp,
Thanks for reply.
I am going to use Rest API for updating timers.

I am trying to get instance of timers using,

List jobList = managementService.createJobQuery().processInstanceId(processInstId).timers().active()
.list();

where processInstId is instance id of main process,but i am getting empty job list.

1 Like

Hi @anjumaara3,

this is odd. There should be two job entities. I can’t reproduce the issue. Can you provide a failing test case?

Best regards.
Philipp

1 Like