formProperties.put("name", "HenryYan");
ProcessInstance processInstance = formService.submitStartFormData(processDefinition.getId(), formProperties);
assertNotNull(processInstance);
RuntimeService runtimeService = activitiRule.getRuntimeService();
System.err.println("=============");
// runtimeService.suspendProcessInstanceById(processInstance.getId());
activitiRule.getRepositoryService().suspendProcessDefinitionById(processInstance.getProcessDefinitionId(), true, null);
System.err.println("=============");
long count = runtimeService.createProcessInstanceQuery().active().count();
assertEquals(0, count);
TaskService taskService = activitiRule.getTaskService();
long count2 = taskService.createTaskQuery().active().count();
assertEquals(0, count2);
runtimeService.activateProcessInstanceById(processInstance.getId());
count = runtimeService.createProcessInstanceQuery().active().count();
assertEquals(1, count);
count2 = taskService.createTaskQuery().active().count();
assertEquals(1, count2);
}