Page tree
Skip to end of metadata
Go to start of metadata

Use stereotype <<MongoDBAdapter>> on an action node to interact with a MongoDB and to insert, get and manipulate documents.

Inserting Documents

Using action insert you can insert one or more documents into a MongoDB. Refer to Action "insert" for a detailed description of all parameters and options.

Deleting Documents

Using action delete you can remove one or more documents from a MongoDB.

For all actions that refer to existing documents, you need to provide a query string (queryString) to identify them. A query string contains all properties of the document you want to use for selection.
The simplest way to create a query string is to create an object having the structure of the document (queryData in the example above), and set all query values to this object.

Then, provide this object as queryString by converting it to JSON using classToJson().

You can remove all documents by providing {} as queryString.
Refer to Action "delete" for a detailed description of all other parameters and options.

  • No labels