ערוך

שתף באמצעות


IPendingWork.Commit(Transaction, ICollection) Method

Definition

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)

Parameters

transaction
Transaction

The Transaction associated with the pending work.

items
ICollection

The work items to be committed.

Remarks

The workflow runtime engine calls the Commit method when its semantics dictate that the pending work in the work batch should be committed. 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. Either all of the work in a batch succeeds or none of it succeeds. You should throw an exception if any of the work items passed to the Commit method in your implementation cannot be committed. Depending on your implementation, you may want to perform some rollback in your Commit method if it cannot commit its work items. 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.

Applies to