Adapter for MongoDB 9.12 | webMethods Adapter for MongoDB Documentation | webMethods Adapter for MongoDB Installation and User’s Guide Documentation | Adapter Services | Configuring Select Document Service
 
Configuring Select Document Service
A Select Document service retrieves specified information from a database collection. You can configure Adapter for MongoDB services using Designer. For more information about adapter services, see Adapter Services.
Refer the section " Before Configuring or Managing Adapter Services" before you configure adapter service.
*To configure select service
1. Right-click the package in Designer, in which contains the service and select New > Adapter Services.
2. Select the parent namespace, type a name for adapter service and click Next.
3. Select Adapter for MongoDB as the adapter type and click Next.
4. Select the appropriate Adapter Connection Name and click Next.
5. Select the Select Document template from the list of available templates and click Finish.
The adapter service editor appears for the adapter service. You can select the Adapter Settings tab anytime to confirm adapter service properties.
6. Use the Collection tab to configure the collections which the operation accesses.
Field
Description/Action
Database
Displays the database name that you provide in the Connections.
Collection
Lists the collection present in the Database.
Sampling Limit
Specify the number of sampling documents to be scanned to get the Document Fields.
Read Preference
The different types of read preference that MongoDB supports. For more information, see Connection Properties in Configuring Adapter for MongoDB Connections .
Read Concern
The different types of read concern that MongoDB supports. For more information, see Connection Properties in Configuring Adapter for MongoDB Connections .
Output Document Limit
Specifies the number of documents that can be displayed as output.
7. Use the Select tab to define the fields to be selected as follows:
a. Use the icon to create new rows as required. You can use icon to fill in all the rows.
Field
Description/Action
Document Fields
Name of the fields from sampling documents that you want to use.
To include a different field name, edit the field appropriately.
Field Type
Specifies the MongoDB data type for Document Fields.
Output Field
Name of the output field based on the Document Fields.
Output Field Type
Specifies the Java data type.
8. Use Filter tab to specify the conditions for selecting information as follows:
a. Select the icon to define new data fields.
b. Select a logical operator from the AND/OR field, an Operator, and separators(left and right parenthesis), and specify values for the following fields:
Field
Description /Action
AND/OR
The logical operator.
Document Field
Name of the fields from sampling documents that you want to use.
To include a different field name in the filter, edit the field appropriately. For more information, see Examples of Designing Filters on an Array of Embedded Documents.
Field Type
Specifies the MongoDB data type for Document Fields.
Input Field
Provide a value for query input during the design time or runtime.
Input Field Type
Specifies Java data type.
Parameter
Displays the index of the output field.
Operator
The query filter operator.
c. You can also use or icons to change the order of the data fields to ensure the parameters are parsed in the correct order.
d. Repeat this procedure until you have specified all data fields.
9. From the File menu, select Save.