You can propagate the transaction to workflows as follows:
Using scope = New TransactionScope() Dim rootTransaction As Transaction = Transaction.Current entries.Content.ReadAs(Of IList(Of WebMaint)).AsParallel.ForAll( Sub(entry) Dim dependentTransaction As DependentTransaction = rootTransaction.DependentClone(DependentCloneOption.RollbackIfNotComplete) _repos.Update(entry) dependentTransaction.Complete() End Sub) scope.Complete() End Using
NOTE: please forgive any VB syntax problems, this is not my native language
source share