Stored Procedure Application Overlay

This chapter explains the use of the Stored Procedure Application Overlay in the Stardust Browser Modeler. A stored procedure is a subroutine available to applications that access a relational database system.

The Stored Procedure Application Overlay allows the process designer to:

Pre-requisites

To explain how the Stored Procedure Application Overlay works, the examples below are using a RDBMS having:

Example 1: Select all

This example shows how to use a Stored Procedure application to invoke a procedure having a select request on the projects table. The query result is assigned to an SDT and displayed on the screen.

In this example, the GetProjectsSP activity is using a Stored Procedure Application.

Stored Procedure application

To create a new Stored Procedure application, select Create Stored Procedure Invocation menu item from the Applications pop-up menu accessible from the Process Model tree:

Structured data types

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

Parameters tab

In the Parameters tab, you have to define the input/output parameters, those parameters can be primitive or structured data.

Configuration tab

In the Configuration tab, enter the stored procedure query:

Data source tab

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

Once the process deployed and executed, the stored procedure result should be displayed as follow:

Example 2: Stored procedure with IN/OUT parameters

The purpose of this example is to show how to invoke a stored procedures with in/out parameters. In this case, the user enter two numbers, then the calculate stored procedure is used to add and multiply their values.

The in/out parameters are defined in the Stored Procedure Application parameter tab

In the Configuration tab, the stored procedure is invoked as below:

When running the process, if we enter "2" and "12" as parameters, the result will be as follow: