InsertinMultipleDB.bwp
This process demonstrates how to insert documents in multiple databases using different connection resources. Two connection resources are configured. As transaction works only on existing collections, InsertDocument and InsertDocument1 activities are created. The process is designed with the following activities:
The following table describes the activities in the process.
Activity | Description |
---|---|
RemoveDocument | Removes all the documents in the specified collection in a database that is configured in MongoDBConnectionResource. |
RemoveDocument1 | Removes all the documents in the specified collection in a database that is configured in MongoDBConnectionResource1. |
InsertDocument | Inserts a document in the specified collection in a database that is configured in MongoDBConnectionResource. |
InsertDocument1 | Inserts a document in the specified collection in a database that is configured in MongoDBConnectionResource1. |
InsertDocument2 | Transaction1 is started with a session. Inserts a document in the specified collection in a database that is configured in the MongoDBConnectionResource using session. |
SubProcess | Invokes the SubProcess. Transaction2 is started with a new session. For example, session 1 because of different connection resource chosen for UpdateDocumentActivity within sub-process. For multiple connection resources, MongoDB Connection Property name must differ that leads to multiple transactions. |
Copyright © 2021. TIBCO Software Inc. All Rights Reserved.