Hi, when I load into my process engine a process that is started with a TimerStartEvent that is configured with a Time cycle of "R/2012/PT10S" (Every 10 seconds in 2012)
If I want to pause the process temporarily. I've tried a couple of things but I'm having troubles preventing the timer from firing.
Here is what I've tried repositoryService.suspendProcessDefinitionById
runtimeService.suspendProcessInstanceById
managementService.setJobRetries(jobId, 0)
But, the timer keep firing every 10 seconds.
I'm using Activiti 5.9 with org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration with jobExecutorActivate = true in a junit test.
Here's the Junit test that I use @Test public void stoppingTimerStartedProcess() throws Exception { RepositoryService repositoryService = activitiRule.getRepositoryService(); RuntimeService runtimeService = activitiRule.getRuntimeService(); ManagementService managementService = activitiRule.getManagementService();
repositoryService.createDeployment() .addInputStream("TimerStartedProcess.bpmn20.xml", new FileInputStream(timerStartedProcessFilename)) .deploy();
AFAIK, the suspension-state is just a marker on the process-definition which is easily query-able, and NOT used by the engine to determine whether or not to allow starting of a process…
The only way you can stop the timer from firing, is to undeploy the process (deployment).