Configuring Update Document Service
About this task
Note: Update service internally uses MongoDB
updateMany operation. Refer to MongoDB documentation
for more details on
updateMany.
Refer the section Before Configuring or Managing Adapter Services before configuring adapter services.
To configure Update service
Procedure
- In Designer, right-click the package which the service contains and select New > Adapter Service.
- Select the parent namespace, type a name for the adapter service, and click Next .
- Select IBM webMethods Adapter for MongoDB as the adapter type and click Next.
- Select the appropriate Adapter Connection Name and click Next.
-
From the list of available templates, select the Update
Document template and click Finish.
The adapter service editor for the adapter service appears. You can select the Adapter Settings tab at any time to confirm adapter service properties such as the Adapter Name, Adapter Connection Name , and Adapter Service Template .
-
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. Acknowledgment Requests the acknowledgment that the Write operation propagates to a specified number of mongodinstances.Journal You select to request the acknowledgment that the mongodinstances has written to the on-disk journal.TimeOut A time limit to avoid the Write operations from blocking indefinitely. Upsert You select to create a new document if the query is unable to retrieve any documents. Bypass Document Validation You select to enable the update operation to bypass document validation. -
Select the
Update tab to define the fields to be
selected as follows:
-
Use the
icon to create new rows as needed. You can use the
icon to fill in
all rows to the table.
Field Description/Action Document Fields Name of the fields from sampling documents that you want to use. 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 the Java data type. Operator Specifies the Update operator.
-
Use the
-
Use
Filter tab to specify the conditions using
the following fields for selecting information:
-
Select the
icon to define new fields. You can use the
icon to fill in
all rows to the table.
-
Select a MongoDB 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. -
You can also use
or
icons to change the order of the fields or documents to ensure the parameters are
parsed in the correct order.
- Repeat this procedure until you have specified all the parameters.
-
Select the
- From the File menu, select Save.