This topic explains how to configure and apply the SQL Responder Action tool, which allows you to model complex interdependent environment scenarios by connecting multiple virtual assets. More specifically, it enables you to have a Message Responder update values in a virtual database that is represented by a .CSV-driven SQL Responder.
The SQL Responder Action tool enables you to establish an interconnected virtualization environment where an operation made by a Message Responder updates values in a virtual database that is represented by a .CSV-driven SQL Responder.
For instance, assume that you are working with a banking service that handles account transfers, deposits, and withdrawals. These operations change the values stored in a database. Now assume that you virtualized the service with a Message Responder and virtualized the database with a SQL Responder. How do you ensure that any new transactions performed from your virtual service update the values that were previously recorded for your virtual database?
By applying SQL Responder Action tools, you can create a synchronized environment so that when the virtualized service performs an operation, it will update the corresponding value in the virtual database. That updated virtual database value can then be accessed or operated on by yet another virtual asset (perhaps another service that retrieves account values and transaction histories)—creating a chain of interconnected operations.
To add a SQL Responder Action tool, chain it as an outgoing response to the Message Responder that modifies data in the virtual database.
Next, configure the following options:
Configure the following settings in this tab:
j. toopen a list of valid JDBC URLs.
You add Query Parameters table values to specify which recorded result set you want updated with the value and operation specified in the Target tab. For instance, you might have result sets for customer_id 12212 and customer_id 12222. If you want this action to be performed only on queries for customer_id 12212, you would indicate this as follows:
Note that the names and values that you specify here need to correspond to the actual values in the SQL query and result set (see the SQL Responder control panel to review the actual values).
Specify which rows of the SQL query result set you want to operate on.
A single SQL query result set could include multiple rows. Using this control, you can specify if the operation should be performed on all rows or on specific rows. For instance, if the result set includes multiple accounts for customer_id 12212 and you want to operate only on account ID 12345, you would indicate this as follows:
The names and values that you specify here need to correspond to the actual row values (see the .csv file referenced in the SQL Responder control panel to review the actual values).
To reset the originally-recorded values for any data that was modified by this tool: