As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public static void main (String[] args) { ProcessEngine processEngine=ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration().buildProcessEngine(); RepositoryService repositoryService = processEngine.getRepositoryService(); repositoryService.createDeployment().addClasspathResource("diagrams/demo2.bpmn").deploy(); RuntimeService runtimeService = processEngine.getRuntimeService(); ProcessInstance pi = runtimeService.startProcessInstanceByKey("escalationExample"); // There should be one task, with a timer : first line support TaskService taskService = processEngine.getTaskService(); Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); System.out.println("First line support = " + task.getName()); // Manually execute the job ManagementService managementService = processEngine.getManagementService(); Job timer = managementService.createJobQuery().singleResult(); managementService.executeJob(timer.getId()); // The timer has fired, and the second task (secondlinesupport) now exists task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); System.out.println("Handle escalated issue = " + task.getName()); }
Is there any way to handle the timer event and how?
org.activiti.examples.bpmn.event.timer.BoundaryTimerEventTest
org.activiti.engine.test.bpmn.event.timer.BoundaryTimerEventTest
Is it something to do with the junit framework?
Does activiti provide that?
Is it not recommended to have a standalone workflow application using the APIs?
What I understand is we will have to write our own code to send the emails to intended user, is that correct?