Skip to main content
Version: 4.45.0

Document Update

The Document Update component allows you to update data in the Content Store.

Handlebars

This component lets you use Handlebars templates. More information about Handlebars can be found in this section

Configuration

Connection string

A MongoDB connection string.

Example: mongodb://<username>:<password>@localhost:27017/<databaseName>

Here <databaseName> is the database to update the content in.

Use TLS

Whether or not to use TLS in case your mongoDB requires TLS.

Allow Invalid Certificates

Checking this will disable certificate validation. Warning: specifying this option in a production environment makes your application insecure and potentially vulnerable to expired certificates and to foreign processes posing as valid client instances.

Certificate Authority File

One or more certificate authorities to trust when making a TLS connection. In order to access the local filesystem, the XILL4_WORKDIRS environment variable must be set to the path of the directory to be accessed.

Example: .\ca.pem

Parse ISO dates

Enables auto parsing of ISO dates to a date object. Can be used when updating a part of a document containing multiple properties of which at least one is a date.

Query

A valid Mongo query that can be passed in find(). Example: {"kind":"CONTAINER"}

You can use Handlebars to create dynamic queries. For nested keys, you can use the so-called dot-notation.

An empty query value or empty object {} will return all the data from the database.

Update Statement

Example: { $set: { "keyToUpdate": "valueToSet" } }

Note that it is not possible to update date fields using the Document update component.

Variables can be used as explained in Query

Inputs

Input

Any object

Outputs

Output

The incoming message with a success message and information about the update.

Example

{
"value": {
"kind": "CONTAINER"
},
"success": true,
"extra": {
"acknowledged": true,
"modifiedCount": 1,
"upsertedId": null,
"upsertedCount": 0,
"matchedCount": 1
}
}