MongoDB Transactions

You can create a group of CRUD activities (insert, query, update, delete) inside a Local Transaction group. You must configure the activities participating in the same transaction with the same shared resource. The transaction is committed or aborted as the execution progresses towards the end of the transaction group. Transactions work only on existing collections.

Note: This feature works with replica sets.
The Local Transaction group is available for the following activities:
  • InsertDocument
  • QueryDocument
  • UpdateDocument
  • RemoveDocument
Perform the following steps to apply transactions to a group of activities:

Procedure

  1. In the application process, right-click and point to Create Group and click Local Transaction.
  2. Add the required activities inside the newly created Local Transaction group.
  3. In the General tab of the Transaction Group, select the Transaction Transport as MongoDB.
  4. In the Advanced tab of the CRUD activities, if the Override Transaction Behavior checkbox is selected then the activity does not participate in the transaction even if it is a part of the transaction group. However, if this activity faults, transaction fails.