Execute Stored Procedure

**NOTE: This plug-in is deprecated and no longer recommended for use for sites running on Appian 22.1 or later. The functionality of this component is available in Appian without installing the plug-in. You can use a!executeStoredProcedureForQuery(), a!executeStoredProcedureOnSave(), or the Execute Stored Procedure Smart Service in Appian 22.1 or later.**

Overview

This plug-in provides a Smart Service and Function for executing stored procedures. The Smart Service can be used to execute stored procedures that modify data. Result sets are returned as CDTs. As custom functions cannot have side-effects, it must not be used to execute stored procedures that modify data. It is only safe to use the Smart Service with stored procedures that modify data. Following SQL Statements should not be used by the stored procedures executed with the function:

  • INSERT
  • UPDATE
  • DELETE
  • TRUNCATE
  • CREATE TEMPORARY TABLE
  • SELECT... INTO (when the input target is not an input or output variable)

Key Features & Functionality

  • Works with both complex and simple data types
  • Tested with: MySQL, SQL Server, and Oracle
  • See the instructions document provided with the download for an example and how to configure
  • (New) Total row count column added to trace log
Anonymous
  • Why I cannot find the following parameter on v1.5.7:

    Timeout: The number of seconds to allow the query to execute before timing out and requested to be cancelled. Defaults to 30 seconds. Maximum 300 seconds.

    and how I can set it up?

  • Hi,

    Will this plugin support PostGresql, Since my current environment is 21.4

  • Hello,

    Seeking anyone using version 1.5.2 of the plug-in and Appian 22.4

    We are currently transitioning away from this Plug-in, but are still a month or more away from being able to operate without it.  The new OOB solution is not a 1-to-1 replacement for this plug-in due to its timeout limitations and data size limitations.

    We are currently using the version 1.5.2 of the plug-in on 22.3 without issues.  We did update the plug-in to v1.5.7 but found ourselves unable to interact with PM nodes for the plug-in at all, so we were forced to revert.

    Our main issue at this time is we would like to upgrade our environment to 22.4 but do not want to risk loss of functionality as this plug-in is core to our operations.  Is anyone successfully using this plug-in with 22.4?

  • Hi,

    We are facing some serious issue with the this smart service:

    We have an audit table is mssql which is capturing all the success and failure of the stored procedure.

    When we are executing the stored procedure using the smart service in our PM, on success the log is getting captured in the audit table but on failure when sp returns and error, in that scenario no log is getting captured in the audit table. Seems like Appian is rolling back the transactions for each failure because for example:

    Row 1 got inserted (on success)

    Row 2 got inserted first then got deleted (on failure)

    Row 3 got inserted (on success)

    Row 4 got inserted first then got deleted (on failure)

    I.e in the audit table primary key entries are like

    1&3 as 2,4 also got inserted but seems like they also got deleted. And this is happening for Every failed transaction, primary key generates and then the row of data gets deleted leaving the next entry for success to happen with the next primary key.

    So only on success of the smart service the data is getting inserted in the audit table. For every error received in the smart service from the sp, data is first getting inserted but then with roll back it. Is getting deleted

    Need urgent help

  • Hi, may we know the details of the Oracle cursor bug that this release is fixing?

    Thank you

  • v1.5.7 Release Notes
    • Bug fix for Oracle cursors
  • Output the cursor, and reference the name of the output parameter in your smart service or function.

  • @Appian team. would like to know how the new Appian smart service is different from this one. We tested it and found that the timeout is still not being executed by the Database due to an error and the performance is no different. It makes sense ofcourse to have this as a default component given IDP is dependent on this and it is a critical component with many use cases

  • v1.5.6 Release Notes
    • Deprecation notice
  • Release Notes v1.5.5
    • Fix for multi-part sql server stored procedure identifiers and CVE fixes.