activiti删除重新(xīn)建表
@Test
public void clear() {
List<Task> resultTask = taskService.createTaskQuery().list();
for (Task task : resultTask) {
runtimeService.deleteProcessInstance(task.getProcessInstanceId(), "删除表單");
}
List<HistoricTaskInstance> his = historyService.createHistoricTaskInstanceQuery().list();
for (HistoricTaskInstance task : his) {
historyService.deleteHistoricTaskInstance(task.getId());
}
List<HistoricProcessInstance> procHis = historyService.createHistoricProcessInstanceQuery().list();
for (HistoricProcessInstance proc : procHis) {
historyService.deleteHistoricProcessInstance(proc.getId());
}
}
- 版權所有(yǒu):奇站網絡 轉載請注明出處
- 廈門奇站網絡科(kē)技(jì )有(yǒu)限公(gōng)司,專業提供網站建設,響應式網站建設,小(xiǎo)程序開發,系統定制開發。
- 軟件開發咨詢熱線(xiàn):吳小(xiǎo)姐 13313868605