In this blog, we will discuss how a Stored Procedure can be exposed and called within a Scribe step from the Scribe Workbench.
As a first step, we need to add a record into the table [dbo].[KSYNCTABLESBASE] in the database where the stored procedure that needs to be invoked exists. Once the record is added, it will show up under the Stored Procedures in the All Data Objects section as shown below.
The below script exposes the stored procedure ‘sp_fmtUpdateWireIntgStatus’ by inserting a record into the [dbo].[KSYNCTABLESBASE] table.
Note: – If the SQL objects for Scribe doesn’t exist in the database, it can be created by running the “ScribeMetaData.sql” script available in the Scribe installation folder.
As a next step, we will discuss how parameter values can be passed from the Scribe Workbench. In order to expose the parameters for the Stored Procedure, we need to add one record per each Parameter the Stored Procedure has into the [dbo].[KSYNCFIELDS] table.
The below script exposes the parameters for the Stored Procedure ‘sp_fmtUpdateWireIntgStatus’.The script adds 3 input parameters named ‘@I_vWireNumber’, ‘@I_vOTLNumber’ and ‘@I_vOption’.
Once the parameters are added, the Stored Procedure can be called within a scribe step by passing values as shown below.
For more information or for assistance with Scribe Integration please do not hesitate to contact FMT Consultants using the form below.