You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

TaskAdapter ActionDescriptionDocumentation Reference
Insert and update documentsinsertInsert new documents to a database.
replaceReplace one or more documents by a new one. The documents are identified by a query.
updateUpdate all or dedicated properties of one or more documents with new values. The documents are identified by a query.
Retrieve documents/informationfindGet 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).
fetchFetch single records from a result set that has been retrieved by find.
Remove documentsdeleteRemove 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().

MongoDBAdapter_CustomerData_Example

Click the icon to download a simple example model that shows the usage of the MongoDB adapter in Scheer PAS Designer.

Accessing MongoDB

You can directly use the MongoDB types and operations from the Base Types package in the service panel, and add them to your model.

Adding a MongoDB Operation to a Diagram

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.

Configuring the MongoDB Operation

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:

AttributeDescriptionAllowed Values / Example
NameThe generated name of the operation within the diagram. insert
TypeThe path to the operation within the data model. Base Components.Add ons.MongoDB.MongoDB
Symbol Type

Operations added to a execution diagram are execution steps.

Execution Step

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

  • select another alias from the list
  • remove the alias by selecting None from the list
  • add a new alias by clicking the icon.

Related Pages:
Related Pages:
Related Documentation:

  • No labels