Execute Stored Procedure
Description
The Execute Stored Procedure activity executes a stored procedure on a connected database.
It allows workflow data to be passed to the stored procedure through input arguments and retrieves output arguments and result data produced by the procedure.
Stored procedures can encapsulate database operations such as data retrieval, insertion, updates, deletion, validation, and other database-specific business logic.
Common settings
Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.
Design-Time Configuration
The following properties define how the activity connects to the database and executes the stored procedure.
Connection Type
Specifies the database engine (for example, SQL Server, Oracle, MySQL, PostgreSQL). Selecting the correct type ensures compatibility with the target database.
Connection Name
Select a preconfigured database connection that defines the server, credentials, and security settings.
Schema
Specifies the database schema that contains the target stored procedure.
Stored Procedure
Specifies the name of the stored procedure to be executed.
Argument Mappings
Defines how workflow data is passed to and retrieved from the stored procedure.
You can map workflow expressions to the procedure's arguments and specify the appropriate direction:
- In – Passes a value from the workflow to the stored procedure.
- Out – Retrieves a value returned by the stored procedure.
- InOut – Passes a value to the stored procedure and retrieves the updated value after execution.
Timeout
Specifies the maximum time (in seconds) that the activity will wait for the stored procedure to complete.
The default value is 600 seconds.
Outputs
Result Table
Returns an IbDataTable containing the result set produced by the stored procedure.
Each row in the returned result set is represented as a row in the DataTable, with columns corresponding to the fields returned by the stored procedure.
Output and InOut argument values are added as columns on the first Result Table row. If there are no result rows but output arguments exist, the activity creates a row for those values. Do not assume a missing result set always produces a zero-row table.
Execution settings
Configure Wait All Incoming when execution paths converge, and On Error for failure handling. Select Inherit where available to use the workflow-level error policy.
Example: Map input and output arguments
Assume a procedure accepts OrderId as In, Status as InOut, and Message as Out.
- Select its connection, schema, and Stored Procedure.
- Map OrderId to the current workflow's order number.
- Map Status to an initial value and choose the Workflow Data destination for its returned value.
- Choose a Workflow Data destination for Message. No input value is required for an Out-only argument.
- Run the procedure. Consume its Result Table, or use the configured destinations for returned arguments.
Argument names and directions must match the procedure metadata. Use the mapping editor to select destinations rather than typing arbitrary text into an output mapping.