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.
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.