This page explains the MongoDB Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to MongoDB Adapter in the Designer guide.
Tagged Values
<<MongoDBAlias>>
The settings on the <<MongoDBAlias>> are used to build the MongoDB connection string and to set database connection options. Each alias will create a separate connection pool. For each request, the xUML Runtime will use one connection from this pool for the entire request duration.
To use the MongoDB adapter it is helpful if you are familiar with the MongoDB options. Each listed tagged value is setting the MongoDB option having the same name.
Please refer to the MongoDB manual for more information on each option.
|
Tagged Value |
Description |
Allowed Values / Examples |
|
|---|---|---|---|
|
Protocol
|
Specifies the protocol to be used with this connection. |
mongodb |
Use the standard MongoDB connection protocol (default). |
|
mongodb+srv |
Use DNS seed list. |
||
|
Hosts
|
Specifies a list of MongoDB host with optional ports (one list entry per line). |
scheer-acme.comdb.scheer-acme.com:2701 |
|
|
Replica Set
|
Specifies a replica set name. |
|
|
|
Database
|
Specifies the default database to be used. |
|
|
|
Collection
|
Specifies the default collection to be used. |
|
|
|
xUML Runtime Use Transactions
|
Specifies whether to use automatic transactions with replica sets. If enabled, the xUML Runtime will apply the transaction concepts as documented on (25.0) xUML Runtime Transaction Concepts. Transactions can only be enabled when using replica sets. Also, some options like read/write concerns make it impossible to use transactions. If a conflict can be detected, the Runtime refuses to start.
|
true |
Use automatic transactions on replica sets. |
|
false |
Do not use automatic transactions on replica sets (default). |
||
|
Authentication |
|||
|
User
|
Specifies the database user (if the database requires authentication). If the user contains characters that MongoDB has defined as to be illegal, they will be converted correctly to percent encoding. |
|
|
|
Password
|
Specifies the password of user(if the database requires authentication). If the password contains characters that MongoDB has defined as to be illegal, they will be converted correctly to percent encoding. |
|
|
|
Defaultauthdb
|
Specifies the defaultauthdb option, the authentication database to be used if user and password are provided. |
|
|
|
Auth Source
|
Specifies the authSource option, the database name that is associated with the provided credentials. |
|
|
|
Auth Mechanism
|
Specifies the authMechanism option, the authentication mechanism to be used to authenticate the connection. |
|
|
|
Auth Mechanism Properties
|
Specifies the authMechanismProperties option, the properties of the specified authMechanism as a comma-separated list of colon-separated key-value pairs. |
CANNONICALIZE_HOST_NAME:true,AWS_SESSION_TOKEN:FQoGZXIvYXdzEN... |
|
|
Compression |
|||
|
Compressors
|
Specifies the compressors option, the compressor to be used for network communication. |
zlib |
Use zlib compression. |
|
none |
No compression. |
||
|
Zlib Compression Level
|
Specifies the zlibCompressionLevel option, compression level if zlibcompression is used. |
-1 |
zlibdefault |
|
0 |
no compression |
||
|
1-9 |
compression level |
||
|
Misc |
|||
|
Retry Reads
|
Specifies the retryReads option. This option enables retryable reads. |
true |
Retry reads (default). |
|
false |
Do not retry reads. |
||
|
Retry Writes
|
Specifies the retryWrites option. This option enables retryable writes. |
true |
Retry writes (default) |
|
false |
Do not retry writes. |
||
|
Pooling |
|||
|
Max Pool Size
|
Specifies the maxPoolSize option, the maximum number of connections in the connection pool. |
any positive integer |
|
|
100 |
default |
||
|
Wait Queue Timeout MS
|
Specifies the waitQueueTimeoutMS option, the maximum wait time for a client connection to become available from the pool. |
any positive integer |
|
|
30000 |
default |
||
|
Read Concern |
|||
|
Read Concern Level
|
Specifies the readConcernLevel option. Refer to the MongoDB manual for more details. |
One of: local (default), majority, linearizable, available, snapshot |
|
|
Read preference |
|||
|
Read Preference
|
Specifies the readPreference option. Refer to the MongoDB manual for more details. |
One of: primary (default), primaryPreferred, secondary, secondaryPreferred, nearest |
|
|
Max Staleness Seconds
|
Specifies the maxStalenessSeconds option, how stale a secondary can be before the client stops using it for read operations. |
any positive integer >= 90 |
|
|
-1 |
default |
||
|
ReadPreferenceTags
|
Specifies the readPreferenceTags option. |
|
|
|
Server selection & discovery |
|||
|
Local Threshold MS
|
Specifies the localThresholdMS option. |
any positive integer |
|
|
15 |
default |
||
|
Server Selection Timeout MS
|
Specifies the serverSelectionTimeoutMS option. |
any positive integer |
|
|
30000 |
default |
||
|
Heartbeat Frequency MS
|
Specifies the heartbeatFrequencyMS option. |
any positive integer |
|
|
10000 |
default |
||
|
TLS |
|||
|
Tls
|
Specifies the tls option, used to enable/disable TLS. |
true |
Enable TLS. |
|
false |
Disable TLS (default). |
||
|
Tls Certificate Key File
|
Specifies the tlsCertificateKeyFile option, the path to a |
|
|
|
Tls Certificate Key File Password
|
Specifies the tlsCertificateKeyFilePassword option, the password to decrypt the certificate file. |
|
|
|
Tls CA File
|
Specifies the tlsCAFile option, the path to a |
|
|
|
Tls Allow Invalid Certificates
|
Specifies the tlsAllowInvalidCertificates option, used to allow invalid certificates. |
true |
Bypass certifiate validation. |
|
false |
Validate the certificate presented by the database instance (default). |
||
|
Tls Allow Invalid Hostnames
|
Specifies the tlsAllowInvalidHostnames option, used to disable hostname validation. |
true |
Do not validate the hostname of the certificate presented by the database instance. |
|
false |
Validate the hostname of the certificate presented by the database instance (default). |
||
|
Tls Insecure
|
Specifies the tlsInsecure option. |
true |
Disable TLS various certificate validations. Refer to the MongoDB manual for details. |
|
false |
Validate TLS certificates (default). |
||
|
Timeout |
|||
|
Connect Timeout MS
|
Specifies the connectTimeoutMS option, the time in milliseconds a connection is attempted before it times out. |
any positive integer |
|
|
30000 |
default |
||
|
Socket Timeout MS
|
Specifies the socketTimeoutMS option, the time in milliseconds a send or receive is attempted on a socket before it times out. |
any positive integer |
|
|
30000 |
default |
||
|
Write Concern |
|||
|
W
|
Specifies the w option. This option requests acknowlegdement that a write operation has been propagated to the specified number of MongoDB instances or MongoDB instances with specific tags. |
a positive integer
|
Acknowledge propagation to the given number of databases. |
|
majority |
Acknowledge propagation to the majority of databases. |
||
|
a tag set |
Acknowledge propagation to the databases with the specified tags. |
||
|
Wtimeout MS
|
Specifies the wtimeoutMS option, the time limit for the write concern in milliseconds. |
any positive integer |
|
|
30000 |
default |
||
|
Journal
|
Specifies the journal option. This option requests acknowlegdement from the database that the write operation has been written to the journal. |
true |
Request acknowlegdement for write operations. |
|
false |
No acknowlegdement of write operations (default). |
||
<<MongoDBAdapter>>
|
Tagged Value |
Description |
Allowed Values |
|
|---|---|---|---|
|
Alias
|
Specify the MongoDB alias resp. the database the adapter should connect to. |
a valid MongoDB alias
|
|
|
Database
|
Overwrite the database given in the alias. |
|
|
|
Collection
|
Overwrite the collection given in the alias. |
|
|
|
Action
|
Holds the action to perform on the database. |
insert |
Insert a new document. |
|
find |
Find a document. |
||
|
aggregate |
Execute an aggregation operation. |
||
|
fetch |
Fetch the next document from a result set. |
||
|
update |
Update a document. |
||
|
replace |
Replace a document. |
||
|
delete |
Delete a document. |
||
MongoDB Adapter Parameters
Action "find"
|
Name |
Type |
Direction |
Description |
Allowed Values / Examples |
|
|---|---|---|---|---|---|
|
database |
String |
in |
Error rendering macro 'multiexcerpt' : Page loading failed
|
|
|
|
collection |
String |
in |
Error rendering macro 'multiexcerpt' : Page loading failed
|
|
|
|
options |
in |
MongoDB options for find. |
|
||
|
queryString |
String |
in |
Error rendering macro 'multiexcerpt' : Page loading failed
|
MongoDB query string as valid JSON |
|
|
handle |
out |
Handle to a result set. You can use fetch to get documents from this result set. |
|
||
|
result |
Array of String |
Array of all resulting documents in JSON format. |
out |
Error rendering macro 'multiexcerpt' : Page loading failed
|
|
|
Array of <document class> |
Array of objects of an xUML class representing the document structure. |
||||
Action "fetch"
There were errors rendering macro:
-
An unknown error occurred.
Action "aggregate"
|
Name |
Type |
Direction |
Description |
|
|---|---|---|---|---|
|
database |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
|
collection |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
|
pipeline |
Array of String |
in |
Pipeline you want to use with aggregation.
Error rendering macro 'multiexcerpt' : Page loading failed
|
|
|
handle |
out |
Handle to a result set. You can use fetch to get documents from this result set. |
||
|
result |
Array of String |
Array of all resulting documents in JSON format. |
out |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
Array of <document class> |
Array of objects of an xUML class representing the document structure. |
|||
Action "insert"
|
Name |
Type |
Direction |
Description |
|---|---|---|---|
|
database |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
collection |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
document |
<document class> |
in |
A data structure representing the document you want to insert. The data structure will be serialized. |
|
documents |
Array of <document class> |
in |
Array of documents you want to insert. Each array element is treated as a single document parameter and all of them will be inserted. |
Action "update"
There were errors rendering macro:
-
An unknown error occurred.
Action "replace"
There were errors rendering macro:
-
An unknown error occurred.
Action "delete"
There were errors rendering macro:
-
An unknown error occurred.
MongoDB Adapter Parameter Types
MongoDBFindOptions
|
Attribute |
Type |
Description |
Allowed Values / Examples |
|---|---|---|---|
|
limit |
Integer |
Limits the number of returned documents. |
any integer between -231 and 231 |
|
skip |
Integer |
Specifies the number of documents to skip in the result set (counted from the beginning). |
any positive integer |
|
projection |
String |
An aggregation document that projects the results accordingly. It defines the final shape of the returned documents. |
valid JSON |
|
sort |
String |
A sort document. |
valid JSON |
MongoDBHandle
|
Attribute |
Type |
Description |
|---|---|---|
|
id |
Integer |
ID of the MongoDB handle. |
MongoDBReplaceOptions
|
Attribute |
Type |
Description |
Allowed Values / Examples |
|
|---|---|---|---|---|
|
upsert |
Boolean |
Specifies if the document should be inserted if no document matches the query. |
true |
Insert document. |
|
false |
Do nothing. |
|||
MongoDBUpdateOptions
|
Attribute |
Type |
Description |
Allowed Values / Examples |
|
|---|---|---|---|---|
|
upsert |
Boolean |
Specifies if the document should be inserted if no document matches the query |
true |
Insert document. |
|
false |
Do nothing. |
|||
|
arrayFilters |
Array of String |
Sets conditions for the filtered positional operators during the update. |
array of filter document as valid JSON strings |
|