This chapter will explain the use of the SQL Application Overlay in the
Stardust Browser Modeler.
SQL Application Overlay gives the process designer the ability to manipulate RDBMS data by providing SQL statement.
To explain how the SQL Application Overlay works, the examples used in this document are using a RDBMS having the following table.
The table projects with some records is defined below.
create table projects (id integer primary key, project varchar(10), license varchar(5)); insert into projects values (1, 'Camel', 'ASF'); insert into projects values (2, 'AMQ', 'ASF'); insert into projects values (3, 'Linux', 'XXX');
The following example show how to use an SQL application type to perform a select request on the projects table. Then the query result is displayed.

In this example, the selectAll activity is making reference to an SQL Application.
To build a new SQL application, select Create SQL Invocation menu item from the Applications pop-up menu accessible from the Process Model tree:

Since the sql query will return a list of projects, you have first to define the Project structured data type having attributes similar to the sql table.The Projects structured data type has 0 or more Project.

In the SQL Application parameters tab, you have to add the input/output parameters, those parameters can be primitive or structured data.

The Expected Result options are:
The following parameters are defined by default. They may not be used in your model.
select * from projects where license = :?param
The query Result Set Data can be a primitive or a structured data variable.

In the Configuration tab, enter the SQL query. The Transacted check box specifies whether to use transacted mode for the SQL command. The Auto Startup check box specifies whether to auto startup the Camel route for the SQL application.

In the Data Source tab, enter the data source connection details (host, port, user, etc.):

Major RDBMS systems (Mysql, Oracle, Postgres) are supported. For other databases, it's possible to enter the URL and the driver as follow:

Once the process deployed and executed, the SQL query result should be displayed as follow:

In the following example, the user enter a license value, then it value will be used to query projects having such license.

The In parameter is defined in the SQL Application parameter tab

The In parameter is passed to the SQL query by using :#param_name style as shown below:

When running the process, if we enter "ASF" as license parameter:

only the corresponding projects will be displayed:

Other examples can be easily done using delete, insert or update sql command.
DELETE FROM projects WHERE id = :#id INSERT INTO projects (id, license, project) VALUES (:#id, :#license, :#project) UPDATE projects SET license =: #license WHERE id = :#id
It is possible to use a configuration variable for data source password. The screens below illustrate how to do that. First select Use Configuration Variable for Password in the data source tab.

Then enter the password value in the model Configuration Variables tab.
