Appearance
Routine call
Calls a stored procedure or function on a database and emits its result: the return value, output parameters, or the rows of a table-valued / pipelined result. Input and output types are generated from the routine signature. Works inside a Sql transaction scope.
Pins
| Pin | Kind | Types | Description |
|---|---|---|---|
| Input | input | generated <flow namespace>.<TypePrefix>_<schema>_<routine>_Input | One property per input (and in/out) parameter. |
| Output | output | generated <TypePrefix>_<schema>_<routine>_Return or the routine's user-defined return type | Return value and output parameters, or one record per returned row. |
| Continue | continue output | same as input | Called when the call produced nothing for Output (see Behaviour). |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
ConnectionString | database link name | Required. Name of a repository database link (link selector). Looked up by exact name; a raw connection string or #name prefix is not resolved. | |
TypePrefix | string | Db | Prefix of the generated type names (an _ is appended if missing). |
ProcedureName | string (database explorer) | Required. Routine name, name, schema.name or schema.package.name (Oracle). Without a schema the link's default schema is used. Triggers reconfigure. | |
CommandTimeOut | integer (seconds) | 20 | Command timeout. |
KeepOriginalNames | boolean | false | true keeps parameter / field names; false converts them to C# names. |
BatchMode | dropdown: 1 Auto, 2 Always, 3 Never | 1 | Whether the rows of one call (result set or returned collection) form a batch for batch consumers (Write file, Bulk insert, Build array, ...). Auto: only if the input record is not already in a batch (Timer, Http listener); a call per record of a batch keeps that batch. Always: a child batch per call. Never: no batch. |
The hidden field OutputTypeName is filled by reconfigure with the full name of the return type, and cleared when the routine has none.
Behaviour
- Reconfigure (changing
ProcedureName) reads the routine signature fresh from the database (never cached, so re-selecting the routine picks up changes), removes the types the component generated before and generates the types below.<schema>_<routine>is the qualified routine name with dots replaced by_(Oracle:<schema>_<package>_<routine>), converted to a C# name unlessKeepOriginalNames. A database without stored routines shows an error: use Sql query there...._Inputwith one property per input and output parameter (database name kept as SQL name), set as the only type ofInput;- for a scalar return value
..._Returnwith propertyReturnValueplus one property per output parameter; for a user-defined (object/record) return type that type itself; for procedures with output parameters only a_Returntype with those parameters; <TypePrefix>_<type schema>_<type>for each user-defined (object / record) parameter type, nested types included. The return type is set onOutput. A component with its default name (or aCAL_name) is renamed toCAL_<ProcedureName>.
- Changing
TypePrefixorKeepOriginalNamesdoes not regenerate the types: re-select the routine. - Per input record the routine is called once; parameter values are read from the input properties by their SQL name (
nullis sent asDBNull). A user-defined (object) parameter is sent as its record, field by field by SQL name, nested records included; anullrecord is sent asnull. - Results:
- scalar return value: one
Outputrecord withReturnValueand output parameters; - object return: one
Outputrecord mapped from the returned structure; - collection or table/pipelined result: one
Outputrecord per element/row; the rows form a batch (BatchMode) that ends after the last row was processed downstream and beforeContinue, an error fails it; - rows were streamed and output parameters have values: an additional
Outputrecord with the output parameters.
- scalar return value: one
Continueis only called in two cases: the routine has no generated return type (OutputTypeNameempty) and returned nothing -Continuegets aNoInputDatarecord; or rows were streamed and no output parameter has a value -Continuegets the input record. It is not a general "finished" signal.
Notes
- The input record must have a property for every routine parameter (matched by SQL name); use the generated
_Inputtype, for example built with a Data mapper. A missing property fails the call. - When a routine returns no rows and has a return type, the result is handled as a return value: an
Outputrecord (possibly with empty values) is emitted instead of callingContinue. Procedures that only have output parameters go through this path too; test them before relying on the result shape.
Example
json
{ "ConnectionString": "MainDb", "ProcedureName": "dbo.GetCustomerBalance", "TypePrefix": "Db" }Http listener → Data mapper (to Db_..._Input) → Routine call → Http response