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.
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
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.