Java Code Examples for org.activiti.engine.HistoryService#deleteHistoricProcessInstance()
The following examples show how to use
org.activiti.engine.HistoryService#deleteHistoricProcessInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyTransactionalOperationTransactionDependentExecutionListener.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
@Override public void notify(String processInstanceId, String executionId, FlowElement currentFlowElement, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) { super.notify(processInstanceId, executionId, currentFlowElement, executionVariables, customPropertiesMap); if (Context.getProcessEngineConfiguration().getHistoryLevel().isAtLeast(HistoryLevel.ACTIVITY)) { HistoryService historyService = Context.getProcessEngineConfiguration().getHistoryService(); // delete first historic instance List<HistoricProcessInstance> historicProcessInstances = historyService.createHistoricProcessInstanceQuery().list(); historyService.deleteHistoricProcessInstance(historicProcessInstances.get(0).getId()); } }
Example 2
Source File: MyTransactionalOperationTransactionDependentTaskListener.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
@Override public void notify(String processInstanceId, String executionId, Task task, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) { super.notify(processInstanceId, executionId, task, executionVariables, customPropertiesMap); if (Context.getCommandContext().getProcessEngineConfiguration().getHistoryLevel().isAtLeast(HistoryLevel.ACTIVITY)) { HistoryService historyService = Context.getCommandContext().getProcessEngineConfiguration().getHistoryService(); // delete first historic instance List<HistoricProcessInstance> historicProcessInstances = historyService.createHistoricProcessInstanceQuery().list(); historyService.deleteHistoricProcessInstance(historicProcessInstances.get(0).getId()); } }
Example 3
Source File: MyTransactionalOperationTransactionDependentExecutionListener.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
@Override public void notify(String processInstanceId, String executionId, FlowElement currentFlowElement, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) { super.notify(processInstanceId, executionId, currentFlowElement, executionVariables, customPropertiesMap); if (Context.getCommandContext().getProcessEngineConfiguration().getHistoryLevel().isAtLeast(HistoryLevel.ACTIVITY)) { HistoryService historyService = Context.getCommandContext().getProcessEngineConfiguration().getHistoryService(); // delete first historic instance List<HistoricProcessInstance> historicProcessInstances = historyService.createHistoricProcessInstanceQuery().list(); historyService.deleteHistoricProcessInstance(historicProcessInstances.get(0).getId()); } }
Example 4
Source File: MyTransactionalOperationTransactionDependentTaskListener.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
@Override public void notify(String processInstanceId, String executionId, Task task, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) { super.notify(processInstanceId, executionId, task, executionVariables, customPropertiesMap); if (Context.getCommandContext().getProcessEngineConfiguration().getHistoryLevel().isAtLeast(HistoryLevel.ACTIVITY)) { HistoryService historyService = Context.getCommandContext().getProcessEngineConfiguration().getHistoryService(); // delete first historic instance List<HistoricProcessInstance> historicProcessInstances = historyService.createHistoricProcessInstanceQuery().list(); historyService.deleteHistoricProcessInstance(historicProcessInstances.get(0).getId()); } }