How to set a Job Due Date in Activiti 5.22.0?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 04:12 PM
I got a reference to a Job object like this:
Job timer = managementService.createJobQuery().processInstanceId(execution.getParentId()).singleResult();
Could anyone please tell me how can I set the timer due date to an arbitrary date or time period in Activiti 5.22.0?
I could not find a suitable method in ManagementService or Job class.
Best regards.
Labels:
- Labels:
-
Alfresco Process Services
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2020 08:55 AM
Hello
You can set timer configuration to use variable instead of static value (like : "PT20S"), and then start process with this variable(so you can set custom value before start).
Pass with variable when starting process :
processVariables.put("timerValue", "PT20S"); RuntimeService runtimeService = processEngine.getRuntimeService(); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("processDefinitionKey",processVariables);
For more details look at https://access.redhat.com/solutions/1275113
