snaker-core/src/main/java/org/snaker/engine/core/OrderService.java
public void cascadeRemove(String id) {
		HistoryOrder historyOrder = access().getHistOrder(id);
		AssertHelper.notNull(historyOrder);
		List<Task> activeTasks = access().getActiveTasks(null, new QueryFilter().setOrderId(id));
		List<HistoryTask> historyTasks = access().getHistoryTasks(null, new QueryFilter().setOrderId(id));
		for(Task task : activeTasks) {
			access().deleteTask(task);
		}
		for(HistoryTask historyTask : historyTasks) {
			access().deleteHistoryTask(historyTask);
		}
		List<CCOrder> ccOrders = access().getCCOrder(id);
		for(CCOrder ccOrder : ccOrders) {
			access().deleteCCOrder(ccOrder);
		}

		Order order = access().getOrder(id);
		access().deleteHistoryOrder(historyOrder);
		if(order != null) {
			access().deleteOrder(order);
		}
	}
public void cascadeRemove(String id) {
		HistoryOrder historyOrder = access().getHistOrder(id);
		AssertHelper.notNull(historyOrder);
		List<Task> activeTasks = access().getActiveTasks(null, new QueryFilter().setOrderId(id));
		List<HistoryTask> historyTasks = access().getHistoryTasks(null, new QueryFilter().setOrderId(id));
		for(Task task : activeTasks) {
			access().deleteTask(task);
		}
		for(HistoryTask historyTask : historyTasks) {
			access().deleteHistoryTask(historyTask);
		}
		List<CCOrder> ccOrders = access().getCCOrder(id);
		for(CCOrder ccOrder : ccOrders) {
			access().deleteCCOrder(ccOrder);
		}

		Order order = access().getOrder(id);
		access().deleteHistoryOrder(historyOrder);
		if(order != null) {
			access().deleteOrder(order);
		}
	}
public void cascadeRemove ( String id ) { HistoryOrder historyOrder = access ( ) . getHistOrder ( id ) ; AssertHelper . notNull ( historyOrder ) ; List < Task > activeTasks = access ( ) . getActiveTasks ( null , new QueryFilter ( ) . setOrderId ( id ) ) ; List < HistoryTask > historyTasks = access ( ) . getHistoryTasks ( null , new QueryFilter ( ) . setOrderId ( id ) ) ; for ( Task task : activeTasks ) { access ( ) . deleteTask ( task ) ; } for ( HistoryTask historyTask : historyTasks ) { access ( ) . deleteHistoryTask ( historyTask ) ; } List < CCOrder > ccOrders = access ( ) . getCCOrder ( id ) ; for ( CCOrder ccOrder : ccOrders ) { access ( ) . deleteCCOrder ( ccOrder ) ; } Order order = access ( ) . getOrder ( id ) ; access ( ) . deleteHistoryOrder ( historyOrder ) ; if ( order != null ) { access ( ) . deleteOrder ( order ) ; } }
级联删除指定流程实例的所有数据：
1.wf_order,wf_hist_order
2.wf_task,wf_hist_task
3.wf_task_actor,wf_hist_task_actor
4.wf_cc_order
@param id 实例id
级联删除指定流程实例的所有数据： 1 . wf_order wf_hist_order 2 . wf_task wf_hist_task 3 . wf_task_actor wf_hist_task_actor 4 . wf_cc_order