MongoDB Adapter
The Designer supports MongoDB - a NoSQL and document oriented database. MongoDB support is native and you do not need to install any client tools or drivers. Also, your PAS system comes with a MongoDB scheer-mongo pre-installed.
Note regarding PAS Kubernetes: If you want to use the MongoDB that comes with your PAS installation, you need dedicated credentials. Please contact our support and request your credentials.
Using the MongoDB adapter, you can
Task | Adapter Action | Description | Documentation Reference |
---|---|---|---|
Insert and update documents | insert | Insert new documents to a database. | |
replace | Replace one or more documents by a new one. The documents are identified by a query. | ||
update | Update all or dedicated properties of one or more documents with new values. The documents are identified by a query. | ||
Retrieve documents/information | find | Get a result set based on a provided query. You can get the result set all at once, or fetch single documents via a handle (see fetch). | |
fetch | Fetch single records from a result set that has been retrieved by find. | ||
aggregate | Aggregate data based on a query and MongoDB pipelines. | ||
Remove documents | delete | Remove one or documents from the database. The documents are identified by a query. |
To use the MongoDB adapter it is helpful if you are familiar with the concepts of MongoDB.
As opposed to standard JSON, with MongoDB the order of keys does matter. Action script statement classToJSON() Operation, however, does not guarantee to preserve the order presented in the class. In many cases that will work but it may behave unexpectedly wrong.
So, with the MongoDB adapter always use classToExtendedJSON() Operation.
Adding a MongoDB Adapter Operation to a Diagram
Expand the path to the MongoDB adapter in the service panel (Base Types/Bridge Base/Base Components/Add Ons/MongoDB):

You can drag out operations from the data model to any diagram:
The example shows how to add a MongoDB adapter operation to a BPMN execution diagram:

Configuring the MongoDB Adapter Operation
Once an operation has been added to a diagram, it needs to be configured as a MongoDB adapter.
Select the newly added MongoDB adapter operation and switch to the Attributes panel:

The following attributes are predefined and cannot be changed:
Attribute | Description | Allowed Values / Example |
---|---|---|
Name | The name of the MongoDB adapter operation. | insert |
Description | If provided, you can find a description of the operation in this field. | |
Is static | Indicates that the operation is static. |
Click Add in the Extensions line to define the selected operation as to be a MongoDB adapter:

Search for the MongoDB Adapter and select it from the list of available adapter extensions. Click Next:

In the next window, you can configure the adapter. You have the following options:

Alias: A MongoDB adapter is configured via its alias (see Aliases for more information on aliases).
Database: Enter the name of the default database to be used.
Collection: Enter the name of the default collection to be used.
Regarding the alias, you have two options:
Use the drop-down list to select an available alias.
Use the + to create a new alias.
If you create a new alias, you can configure it in the following dialog:

Refer to MongoDB Adapter Reference for more information on the configuration options of this adapter.
Click Save to create the alias and add it to the extension.
Refer to Aliases for more information on how to create a new alias.
Save the adapter configuration. The Attributes panel now shows the added adapter extension.
If you want to remove an alias from an extension, select None from the drop-down list:

To remove a database or collection, click the corresponding Minus:

MongoDBAdapter_CustomerData_Example
Click here to download a simple example model that shows the usage of the MongoDB adapter in Scheer PAS Designer.
Related Content
Related Documentation: