Insert Data

This activity inserts the specified rows into a database.

To add this activity to a workflow definition 

To configure this activity

  • Activity Name

    Once added to a workflow definition, the default name of an activity can be changed. Providing a custom name for an activity helps you remember the role it plays.

    To name an activity

    1. Add an activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under Activity Name in the Properties Pane, replace the default name.
    4. Note: Activity names cannot be the same as any other activity name in the workflow, they cannot be the same as the workflow's name, they must be less than 100 characters, they must contain at least one alphanumeric character, they cannot be "Name," and they cannot be the same as the activity's runtime type (which is usually only an issue with custom activities).

  • Activity Description

    Use the Activity Description to provide descriptive text to help you remember the role that the activity plays in the workflow. All activities contain a default description that you can modify while constructing your workflow.

    To modify an activity description

    1. Add an activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under ClosedActivity Description in the Properties Pane, replace the default description.
  • Data Source

    This property box determines which data source the activity will use.

    To select a data source

    1. Add a Custom Query, Insert Data, Query Data, or Update Data activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under ClosedData Source in the Properties Pane, select a data source from the drop-down menu.
    4. Note: Because the Workflow Server performs the data-source queries, you must create all data sources on the Workflow Server. Services cannot access mapped drives when you are setting up the data source.

    5. Optional: To add, configure, remove, or test a connection to an external data source, select Manage Data Sources from the drop-down menu. More information.
    6. Optional: Click the refresh icon to update the list of data sources available in the drop-down menu.
  • Data to Insert

    This property box determines what row values will be inserted into a database with the Insert Data activity.

    Note: You must configure the Data Source property box before configuring this property box.

    To configure Data to Insert

    1. Add the Insert Data activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under Data to Insert in the Properties Pane, select a table from the drop-down menu.
    4. Optional: Click Refresh to update the list of tables, if you have made changes to the data source.
    5. Optional:Click Create Identity Token to retrieve the identifier of the inserted rows.
    6. Click Set Values or anywhere in the dark gray box, to open the ClosedData to Insert dialog box.
    7. Select the boxes next to the Columns for which you want to specify values in the inserted row. Hold down the SHIFT or CTRL key to select multiple rows at once.
    8. Type in a value next to the Columns you selected, or click the Token button (right arrow) to use tokens.
    9. Tip: To replace a token that has a blank value with "DB.NULL," apply the NULL token formatting expression.To always set a column's value to "DB.NULL", insert "%(DB.NULL)".

    10. Click OK.
  • Query Options

    This property box allows you to specify a custom timeout for data query activities.

    To specify a custom timeout

    1. Add a Custom Query, Insert Data, Query Data, or Update Data activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under ClosedQuery Options in the Properties Pane, select the Specify a custom timeout check box and specify the desired timeout value in seconds.

    Note: The default timeout value is 30 seconds.

Data Source

This property box determines which data source the Custom Query, Insert Data, Query Data, and Update Data activities will use.

To select a data source

  1. Add a Custom Query, Insert Data, Query Data, or Update Data activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
  2. Select the activity in the Designer Pane.
  3. Under Data Source in the Properties Pane, select a data source from the drop-down menu.
  4. Note: Because the Workflow Server performs the data-source queries, you must create all data sources on the Workflow Server. Services cannot access mapped drives when you are setting up the data source.

  5. Optional: To add, configure, remove, or test a connection to an external data source, select Manage Data Sources from the drop-down menu. More information.
  6. Optional: Click the refresh icon to update the list of data sources available in the drop-down menu.

Data to Insert

This property box determines what row values will be inserted into a database with the Insert Data activity.

Note: You must configure the Data Source property box before configuring this property box.

To configure Data to Insert

  1. Add the Insert Data activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
  2. Select the activity in the Designer Pane.
  3. Under Data to Insert in the Properties Pane, select a table from the drop-down menu.
  4. Optional: Click Refresh to update the list of tables, if you have made changes to the data source.
  5. Click Set Values or anywhere in the dark gray box, to open the Data to Insert dialog box.
  6. Select the boxes next to the Columns for which you want to specify values in the inserted row. Hold down the SHIFT or CTRL key to select multiple rows at once.
  7. Type in a value next to the Columns you selected, or click the Token button (right arrow) to use tokens.
  8. Tip: If you want a token to be replaced by DB.NULL in the case that the token's value is blank (the empty string), apply the NULL token formatting expression. If you want to set a column's value to DB.NULL regardless, insert the NULL token: %(DB.NULL).

  9. Click OK.