public void DeleteProcess(Guid processId) { using (MySqlConnection connection = new MySqlConnection(ConnectionString)) { WorkflowProcessInstance.Delete(connection, processId); WorkflowProcessInstanceStatus.Delete(connection, processId); WorkflowProcessInstancePersistence.DeleteByProcessId(connection, processId); WorkflowProcessTransitionHistory.DeleteByProcessId(connection, processId); WorkflowProcessTimer.DeleteByProcessId(connection, processId); } }
public void DeleteProcess(Guid processId) { using (var connection = new MySqlConnection(ConnectionString)) { connection.Open(); using (var transaction = connection.BeginTransaction()) { WorkflowProcessInstance.Delete(connection, processId, transaction); WorkflowProcessInstanceStatus.Delete(connection, processId, transaction); WorkflowProcessInstancePersistence.DeleteByProcessId(connection, processId, transaction); WorkflowProcessTransitionHistory.DeleteByProcessId(connection, processId, transaction); WorkflowProcessTimer.DeleteByProcessId(connection, processId, null, transaction); transaction.Commit(); } } }