Help Centre › Building Processes
This article describes the RPA Database functionality to call a stored procedure.
For a full list of available functions, please read DATABASE functions.
Description
The Call stored procedure function executes a stored procedure on the database and returns its result set. This is useful for calling pre-defined business logic that resides in the database server.
Setting it up
To use the Call stored procedure function, follow these instructions:
{{popups:rpas/add:action=db-call-procedure}}
Once on a process map:
- Navigate to the process where you would like to add the Call stored procedure function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Call stored procedure option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Name | Yes | Text | - | The alias of a previously opened connection (from db-connect) |
| Procedure | Yes | Text | - | The stored procedure name, e.g. "dbo.my_proc" or "my_proc" |
| Params | No | Array | - | An array of input parameter values for the stored procedure |
| Variable | No | Text | procedure_result | Variable name to store the procedure result set |
Output variables
| Variable | Type | Description |
|---|---|---|
| {procedure_result} | Array | The result set returned by the stored procedure |
Errors
| Error | Description |
|---|---|
| Connection not found | No open connection exists with the specified name |
| Procedure not found | The specified stored procedure does not exist in the database |
Tips
- Use schema-qualified names for SQL Server (e.g. "dbo.my_proc") to avoid ambiguity
- Pass parameters as an ordered array matching the procedure's parameter order