Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2022.1

...

  1. Right-click on your responder and choose Add Output...

  2. Select an incoming request type in the wizard and choose Data Repository CRUD Tool. 
  3. Click Finish and specify a name for the tool (optional).
  4. Click Add in the Configuration tab and specify name for the operation (optional).
  5. Enable the Create, ReadUpdate, or Delete option.
  6. Choose the data repository data source you want to perform the operation on from the Data Source drop-down menu.
  7. Click Add in the Correlation section and specify the correlation columns and values of the data set records that you want to manipulate. See Data Source Correlation Tab for  for details on how to configure data source correlation criteria.

    When creating records with new key values, either with the Create or Update (when "Create if unable to update" is enabled; see Update Configuration for more information) operation, be sure to specify values for all keys under correlation. Any unspecified key values will be set to null.

     

  8. Configure the specific settings for Create, ReadUpdate, or Delete operations and save your changes.
  9. You can add additional configurations so that you can perform multiple operations on multiple fields in the same execution.
  10. Deploy your responder and execute your client to perform the operations you configured on the connected repository.

...

  1. Click Add in the Read section and choose the element selector type.
    1. Choose Record to specify the XPath of the record value you want to read.
    2. Choose Key to specify the key column containing the key value you want to read. In the following example, the repository contains a key column called "catsKeyCol." 

      The repository contains two rows of selectable records.

      In this example, a wildcard is set in the data source correlation section, which indicates that the CRUD tool should read from all records. At runtime, the CRUD tool should return values 1 and 2.

  2. Specify a custom column name in which to store the value.
  3. If you are using the tool with a SOAtest client, you can also choose a column from a writable data source column.
  4. If your suite contains variables, you can specify a column name matching a variable value
  5.  Click OK and enable any additional operation settings you want to apply:
    • Enable the Fail if no correlation match option to prevent the tool from reading the repository if errors are reported. This option is enabled by default.
    • Enable the Return the first correlation match only to stop reading after the first match. This option is enabled by default.
    • Enable the Extract empty elements as: option and specify a value or parameterized value to use if the elements are empty.
    • Enable the Extract missing elements as: option and specify a value or parameterized value to use if the elements are missing.

...

Update Configuration

Specify the location of the record you want to update using an XPath-like selector for accessing records in the data repository.

  1. Click Add and specify the update mode. The following modes are available: 
    1. Replace Element(s). This mode updates the value of individual primitive records, such as strings.
    2. Replace List. This mode updates non-primitive values, such as arrays.    
    3. Append to List. This mode adds a value to the end of an array. 
    4. Prepend to List. This mode adds a value to the beginning of an array.
    5. Delete from List. This mode removes a value from an array.
  2. Specify the location of the element you want to update in the location field.
  3. In the Value field, specify the new value using one of the following options:
    1. Choose Simple to enter a fixed value. You can also choose the special [exclude]  or [null] values from the the drop-down menu. 
    2. Choose Scripted and click Edit Script to programmatically specify a new value based the existing record. 
    3. Choose Parameterized and choose an extracted value from the drop-down menu.
    4. Choose Complex and click Edit JSON to manually specify updates to the structure and values of the record. You can modify the JSON using the Form JSON view (default) or Literal view. Click Reset Template to undo modifications. The Form JSON view also supports cut, copy, delete, and insert action from the right-click menu.
  4. Click OK
  5. Enable any additional settings in the Operation Settings section: 
    1. Enable the Create if unable to update option to create a new record if an existing record cannot be found. Be sure to specify values for all keys under correlation. Any unspecified key values will be set to null.
    2. Enable the Fail on correlation and update errors option to prevent the tool from update the repository if errors are reported. This option is enabled by default. 

...