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.
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. | ||
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(), 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(). |
You can directly use the MongoDB types and operations from the Base Types package in the service panel, and add them to your model.
Expand the Base Types in the service tree. You can find the MongoDB types and operations at Base Types > Base Components > Add ons > MongoDB. | |
You can drag out operations from the MongoDB base types to any diagram: The example on the left shows how to add an insert operation to an execution diagram. |
Once a MongoDB operation has been added to a diagram, it needs to be configured as a MongoDB adapter.
Select the newly added MongoDB operation and switch to the Attributes panel. You can see the following information:
All this comes with the Designer and cannot be changed. | |||||||||||||
Click Add Stereotype to define the selected operations as to be a MongoDB adapter. | |||||||||||||
Select MongoDB Adapter from the list of available adapter stereotypes. Click Save. | |||||||||||||
The Attributes panel now shows the added adapter stereotype. You still need to configure the adapter. Expand the stereotype by clicking the arrow on the right. | |||||||||||||
A MongoDB adapter is configured via its alias. Additionally, you can specify a dedicated database, collection and/or action. Click the icon to create a new MongoDB alias, or select an existing alias from the list of aliases. | |||||||||||||
Once an alias has been assigned, you can
|