clsMongoDeleteObjects Step
Description:
This step removes the JSON objects from MongoDB.
Inputs
- connID – select MongoDB connection string
- dbName - provide database name
- collectionName - provide collection name
- jsonFilter - provide JSON filter to match objects for deletion
Returns
- True – step executed successfully
- False - step failed to execute
Usage:

Prerequisite:
Navigate to the Integration - Connections page. Create a new MongoDB connection string as shown below. Then click the Test button to validate the connection response.

Example:
Let’s build and execute the “clsMongoDeleteObjectsDef” example.
- Create a new process definition named “clsMongoDeleteObjectsDef” and open it in designer mode.
- Drag “clsMongoGetObjects, and clsMongoDeleteObjects” steps to the canvas.
- Connect the dots between the “Start” and other steps, as shown above.
- Define a variable or global required to store JSON objects.
- Click the "clsMongoGetObjects" step to configure its "Required" properties. Provide a name for the step. Select the MongoDB connection string from the drop-down list. Provide the database name. Provide the collection name. Provide the variable or global reference to store the JSON object fetched during execution. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the "clsMongoGetObjects" step to configure its "Optional" properties. Provide a JSON filter to match the object. Note: This configuration is optional; if left empty, the step will fetch all JSON objects.

- Click the "clsMongoDeleteObjects" step to configure its "Required" properties. Provide a name for the step. Select the MongoDB connection string from the drop-down list. Enter the database name. Enter the collection name. Enter the JSON filter to match the objects for deletion. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the "clsMongoGetObjects" step to configure its "Required" properties. Provide a name for the step. Select the MongoDB connection string from the drop-down list. Enter the database name. Enter the collection name. Enter the variable or global reference to store the JSON object fetched during execution. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the "clsMongoGetObjects" step to configure its "Optional" properties. The JSON filter for matching objects is intentionally left empty. Note: The step shall fetch all the JSON objects.

- The “Logging” configuration is necessary for documentation and to measure workflow progress and percent complete. This is done by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its variables. The “clsMongoDeleteObjects” step should delete the JSON objects from MongoDB as configured.
Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete any missing configuration steps, such as file path references and database connections, after the import. Then, save the definition to confirm the changes.