The SQL actor adapter supports the Integration Mapping Wizard (IMW) feature. IMW uses simple, form-based inputs to construct XML-based inputs for wrappers. IMW abstracts the difficulty involved in writing complex XML inputs for wrappers, hence, you can use IMW to execute workflows in a user-friendly way. You can use the Integration Mapping Activity of BMC Atrium Orchestrator Development Studio and the IMW to perform basic operations like insert, update, delete, and select using the SQL actor adapter.
For more information about Integration Mapping activity and IMW, see the BMC Atrium Orchestrator Development Studio documentation.
This section explains how to use the IMW feature to perform basic operations like Insert, Update, Delete, and Select using the SQL actor adapter.
Enable the SQL actor adapter on the grid.
You can configure the SQL actor adapter for single and multiple targets. The following figure shows a sample adapter configuration.
<configs> <config name="config1-oracle"> <target>10.128.248.78</target> <port>1521</port> <user-name>bmcadmin</user-name> <password>abc123</password> <subprotocol>oracle:thin</subprotocol> <database>testdb</database> <driver>oracle.jdbc.driver.OracleDriver</driver> </config> <config name="sybasedb"> <target>10.128.249.21</target> <url>jdbc:sybase:Tds:10.128.249.21:5000/MASTER</url> <user-name>sa</user-name> <driver>com.sybase.jdbc3.jdbc.SybDriver</driver> <password /> <database>master</database> </config> </configs>
Create a new process and drag the Integration Mapping activity from the Activity palette to the process window and map it with the Start and End activities.
Select the operation you want to perform and then, click Go (in this case, Insert Query).
Select the target on which you want to send the request and then, click Go.
Note
SQL IMW does not support dynamic targets. In other words, you can not define the targets at request time.
Select the table on which you want to perform the operation and then, click Go.
Specify inputs for Field Name, Required, Datatype, and InputValue to insert data in the selected table.
You can enter the data or map the context value in the InputValue column. The fields marked as Requiredare a must.
Note
For the Insert Query operation, you do not have to enclose the input data in single quotes (') for the following text-based data types:
'Test User Name'
.This following screen depends on the operation selected in step 5.
Select * from Table_Name
.If you want to select specific columns from the table, mark the fields as true. For example, setting employee_id, employee_name, and employee_email = true, is equivalent to Select employee_id, employee_name, employee_email from Table_Name
.
Note
For all the fields, the default value is false. Therefore, if you do not set any fields to true, an exception occurs.
If you set both the fields, Name and All (keyword), to true, All takes precedence and the query is equivalent to Select * from Table_Name
.
Hence, to select specific columns, set All to false or leave it blank.
To filter records based on certain criteria, use the Where keyword and, specify the criteria for selection, for example, Where employee_id = 2001
. To define a complex criteria, use operators like =, !=, <, >, <=, >=, AND, OR, LIKE, and so on. You can specify the Where clause by selecting all the columns or specific columns.
Note
Similar to the Insert Query operation, you might have to provide the values for text-based data types in single quotes (').
Map the adapter response for the context item and then, click Finish.
4 Comments
James Annis
Deepa Bhat
Ariel Manka
Those images are unreadable
Urvashi Mehandiratta
Images are not clear.