MongoDB Binds

Business rules can use the following binds for the integration with MongoDB.

Each bind is defined in the sections below.

Configuration

To use any bind:

  1. Create a business rule as defined in the Creating a Business Rule, Function, or Library topic here.

  2. Edit the business rule as defined in the Editing a Business Rule or Function topic here.

  3. In the Edit Operation dialog, add the bind to a business rule, as defined in the Adding a Bind topic in the Reference Materials documentation here.

  4. In the Edit Operation dialog, optionally add Messages, as defined in the Adding a Localized Business Rule Message topic here.

  5. In the Edit Operation dialog, add JavaScript to call the bind.

JSON Document

When used in a business action referenced from the 'Mongo delivery' plugin, this bind gives access to a JSON object for the data that has just been persisted.

MongoDB Context

This bind gives access to an object with the following methods:

getMongo() 

The MongoDB database is accessed via the com.mongodb.Mongo object. For more information, refer to the Javadoc for the com.mongodb.Mongo object.

getContext()
getContextID()
getRawDBName()