Delete DB records based on created by Users

Use this step to delete DB records by the created user.

Last published at: September 5th, 2025

deleteDBRecordsByCreatedUser Step

Description:

The DeleteDBRecordsByCreatedUser workflow step deletes database records based on the selected created-by users.

The step allows one or more users to be selected as the created-by user criteria and provides True and False return paths for subsequent workflow processing.

The step supports:

  • Selecting users whose created records to delete.
  • Using the selected users as the criteria for the database-record deletion operation.
  • Executing database cleanup as part of a workflow.
  • Returning a True or False result for subsequent workflow processing.
  • Connecting different workflow paths based on the returned result.

 

Inputs

  • CreatedUsers – The Select created by users to delete property specifies the users whose created records are targeted by the step.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity when the database-record deletion operation returns True.
  • False – The False return path can be used for error handling or an alternative workflow path when the operation returns False.
 

 

Usage:

The DeleteDBRecordsByCreatedUser step is typically placed in a workflow when you need to remove database records associated with selected created-by users as part of a controlled database-cleanup operation.

A typical workflow pattern is:

Select Users → Delete User Records → Continue Process

The step can be used as part of workflow activities involving:

  • Database cleanup.
  • User-related data maintenance.
  • Removal of records associated with selected users.
  • Administrative cleanup workflows.
  • Controlled data-retention processes.
  • Post-processing cleanup.
  • Scheduled or manually initiated cleanup workflows.

 

 

Typical Workflow Suggestions:

Delete Records for Selected Users

Use the step when an administrator or workflow needs to remove database records associated with specific users.

Example:

Select Users
     |
     v
Delete User Records
     |
     v
Continue Process
The selected users are supplied through the Select created by users to delete property.

 

User Data Cleanup

Use the step as part of a workflow that performs cleanup associated with selected users.

Example:

Identify Users
      |
      v
Review Cleanup Criteria
      |
      v
Delete User Records
      |
      v
Complete Cleanup
This pattern can place the deletion operation after the workflow has determined which users to include.

 

Administrative Database Cleanup

Use the step as part of an administrative workflow for controlled database cleanup.

Example:

Start
  |
  v
Select Created-By Users
  |
  v
Delete User Records
  |
  v
Log/Complete Cleanup
The workflow can provide the selected users through the step's user-selection property.

 

Place the step after activities that identify or process user-related information.

Example:

Retrieve User Information
        |
        v
Determine Cleanup Users
        |
        v
Delete User Records
        |
        v
Continue
This pattern separates the process of determining the target users from the deletion operation.

 

Controlled Record Removal

Use the step after a workflow decision has determined that database cleanup should take place.

Example:

Evaluate Cleanup Requirement
          |
          v
       Decision
        /    \
      Yes     No
       |       |
       v       v
Delete       Skip
Records      Cleanup
This prevents the deletion operation from running when the workflow's conditions do not require it.

 

Delete Records for Multiple Users

The Select created by users to delete property uses the selectUsers data type, allowing users to be selected through the FlowWright user-selection control. 

A conceptual configuration could therefore be:

Select created by users to delete:

    User A
    User B
    User C
The workflow can then execute the database-record deletion operation using the configured selection.

 

Example:

Let’s build and execute the “deleteRecordsByCreatedUserDef” example.              

  • Create a new process definition named “deleteRecordsByCreatedUserDef” and open it in designer mode. 
  • Drag a “deleteRecordsByCreatedUser” step to the canvas.
  • Connect the dots between the “Start” and “deleteRecordsByCreatedUser” steps, as shown above. 
  • Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
  • Define a variable or a global to store the result.
  • Click the "deleteRecordsByCreatedUser" step to configure its "Required" properties. Provide a name for the step, then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Click the "deleteRecordsByCreatedUser" step to configure its "Optional" properties. Click the button to select users. A pop-up window appears for configuration. Use the navigation keys to search for and select the users. Click the Save button. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Do this 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 and click the Delete User Records step to view its properties. When the workflow reaches the step, FlowWright executes the database-record deletion operation using the configured Select created by users to delete property. The step provides the True and False return paths for subsequent workflow processing. Before executing the workflow in a production environment:
    • Verify the selected users.
    • Verify that the intended records are eligible for deletion.
    • Confirm that the workflow is executing against the intended environment.
    • Verify the downstream True and False paths.
    • Execute the workflow.
    • Review the process instance after execution.

 

Tips:

  • Carefully review the Select-created-by-users-to-delete selection before executing the workflow.
  • Use a test environment when initially validating the step.
  • Select only the users intended for the cleanup operation.
  • Test the workflow with representative users before deploying it.
  • Verify both the True and False workflow paths.
  • Consider connecting the False path to appropriate error handling or notification activities.
  • Use meaningful step names and descriptions to make database cleanup operations easy to identify.
  • Review the workflow sequence before placing the deletion step.
  • Place appropriate validation or decision activities before the deletion operation when required.
  • Maintain appropriate logging for database cleanup operations.
  • Verify the result after executing the workflow.
  • Test the workflow after changing the selected-user configuration.
  • Consider the impact of deleting records before executing the workflow against production data.
  • Ensure that required records are not unintentionally included in the selected-user criteria.
  • Do not assume which database tables or record types are affected unless confirmed by the FlowWright implementation.
  • Do not assume that an empty user selection has a particular meaning; the XML marks the property as optional but does not define the behavior of an empty selection.
  • Do not assume transaction, rollback, retry, or recovery behavior unless confirmed by the implementation.
  • Follow applicable data-retention and database-management procedures before using the step for production cleanup.

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

Note: After importing a sample, verify and complete any missing configuration, including:

  • Users selected in Select created by users to delete.
  • Any workflow-specific user-selection configuration.
  • Environment-specific settings.
  • Upstream activities that determine the cleanup users.
  • Downstream True workflow path.
  • Downstream False workflow path.
  • Logging configuration.
  • Any required validation or approval activities.

After verifying the configuration, save the Process Definition before execution.

Click here to download the sample file.