IPendingWork.Commit(Transaction, ICollection) Método
Definição
Confirma a lista de itens de trabalho usando o objeto Transaction especificado.Commits the list of work items by using the specified Transaction object.
public:
void Commit(System::Transactions::Transaction ^ transaction, System::Collections::ICollection ^ items);
public void Commit (System.Transactions.Transaction transaction, System.Collections.ICollection items);
abstract member Commit : System.Transactions.Transaction * System.Collections.ICollection -> unit
Public Sub Commit (transaction As Transaction, items As ICollection)
Parâmetros
- transaction
- Transaction
O Transaction associado com o trabalho pendente.The Transaction associated with the pending work.
- items
- ICollection
Os itens de trabalho a serem confirmados.The work items to be committed.
Comentários
O mecanismo de tempo de execução de fluxo de trabalho chama o Commit método quando sua semântica determina que o trabalho pendente no lote de trabalhos deve ser confirmado.The workflow runtime engine calls the Commit method when its semantics dictate that the pending work in the work batch should be committed. Quando ele atinge um ponto de confirmação, o mecanismo de tempo de execução do fluxo de trabalho chama o Commit método em cada IPendingWork objeto em seu lote de trabalhos; o mecanismo de tempo de execução do fluxo passa o Commit método a coleção de itens associados a esse IPendingWork objeto.When it reaches a commit point, the workflow runtime engine calls the Commit method on each IPendingWork object in its work batch; the workflow runtime engine passes the Commit method the collection of items associated with that IPendingWork object. Todo o trabalho em um lote é executado com sucesso ou nenhum deles é bem-sucedidos.Either all of the work in a batch succeeds or none of it succeeds. Você deverá lançar uma exceção se qualquer um dos itens de trabalho passados para o Commit método em sua implementação não puder ser confirmado.You should throw an exception if any of the work items passed to the Commit method in your implementation cannot be committed. Dependendo de sua implementação, talvez você queira executar alguma reversão em seu Commit método se ele não puder confirmar seus itens de trabalho.Depending on your implementation, you may want to perform some rollback in your Commit method if it cannot commit its work items. Se o mecanismo de tempo de execução do fluxo de trabalho confirmar com êxito todo o trabalho no lote de trabalhos, ele chamará Complete com o succeeded parâmetro definido como true ; caso contrário, ele chamará Complete com succeeded definido como false .If the workflow runtime engine successfully commits all of the work in the work batch, it calls Complete with the succeeded parameter set to true; otherwise, it calls Complete with succeeded set to false.