Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 22.1

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.
aggregateAggregate data based on a query and MongoDB pipelines.
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.

Note

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.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameMongoDBAdapter_CustomerData_Examplemongodb
PageWithExcerptINTERNAL:_designer_examples
shouldDisplayInlineCommentsInIncludesfalse

Accessing MongoDB

examples_BRIDGE

Adding a MongoDB Adapter Operation to a Diagram

Image Modified

Expand the Base Types path to the MongoDB adapter in the service tree. You can find the MongoDB types and operations at Base Types > Base Components > Add ons > MongoDB.panel (Base Types/Bridge Base/Base Components/Add Ons/MongoDB ).

Image AddedImage Removed

You can drag out operations from the MongoDB base types data model to any diagram:

The example on the left shows how to add an insert a MongoDB adapter operation to an BPMN execution diagram.

Configuring the MongoDB Adapter Operation

Once a MongoDB an operation has been added to a diagram, it needs to be configured as a MongoDB adapter.

Image RemovedImage Added

Select the newly added MongoDB adapter operation and switch to the Attributes panel.

You

Depending on the diagram type you can see the following information (example BPMN execution diagram):

AttributeDescriptionAllowed Values / Example
NameThe
generated
name of the MongoDB adapter operation
within the diagram
. insert
TypeThe path to the operation within the data model.Base Components.Add
ons
Ons.MongoDB.MongoDB
Symbol TypeOperations added to
a
an execution diagram are execution steps. Execution Step

All this

comes with the Designer

is predefined and cannot be changed.

Image RemovedImage Added

Click Add Stereotype to define the selected operations operation as to bea MongoDB adapter.

Image RemovedImage Added

Select MongoDB Adapter from the list of available adapter stereotypes.
Click Save.

Image RemovedImage Added

The Attributes panel now shows the added adapter stereotype.

You

Now you still need to configure the adapter.

Expand the stereotype by clicking the arrow on the right.

Image RemovedImage Added

A MongoDB adapter is configured via its alias. Additionally, you can specify a dedicated database, collection and/or action.

Click the Image Removed icon to create a new MongoDB alias, or select an existing alias from the list of aliases.

change the database and the collection.

The adapter action derives from the used operation. Do not configure this.

Image Added

You can select an existing alias from a drop-down list by clicking the text Select alias.

If you want to remove an added alias, select None from the drop-down list:

Image Added

Image Added

You can also create and add a new alias by clicking the corresponding  Image Added  icon.

Refer to Aliases for more information on how to create a new alias.

Image Added

A new dialog opens where you can name and configure the new alias.

Refer to MongoDB Adapter Reference for more information on the configuration options of this adapter.

Image Added

To add a database or a collection, click on the corresponding iconImage Added  icon and enter the respective name.

You can remove an added database or collection by clicking on the corresponding Image Addedsymbol

Image Removed

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 Image Removed icon

    .

    Rp

    Children Display

    Rp
    Rde