Output parameter of "Execute Stored Procedure" smart service

Certified Associate Developer

Hi,

I was trying to get Employee related data by executing a stored procedure with the help of "Execute Stored Procedure" smart service in a process model. To get the data, in "Output" tab of Data I have selected a variable as Target variable and type of which is employee CDT. There is a section with the name "Expression". What should I write at "Expression"? Because at the time of publishing it is showing error as follows:

  

The Output tab:

Can any one please let me know what should I write at Expression box, so that I can get the employee data which is returned by the store procedure at Appian end?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Per the documentation provided with the plug-in:

    In other words, you'll need a CDT that exactly matches the columns in the output data set, and an ACP that either matches an OUT parameter of the stored procedure or otherwise named like "resultSet1" etc.

    Edit to add: an easier method to get and deal with the results of a stored-procedure backed query (assuming you're querying only, and not writing/modifying data) would be to put your SP read in an expression rule, and not use the Execute Stored Procedure process node at all.  In the expression rule you'd use the executeStoredProcedure function which is a little more lenient in its output - it simply spits out a data dictionary that you can parse and then deal with as you like.

Reply
  • 0
    Certified Lead Developer

    Per the documentation provided with the plug-in:

    In other words, you'll need a CDT that exactly matches the columns in the output data set, and an ACP that either matches an OUT parameter of the stored procedure or otherwise named like "resultSet1" etc.

    Edit to add: an easier method to get and deal with the results of a stored-procedure backed query (assuming you're querying only, and not writing/modifying data) would be to put your SP read in an expression rule, and not use the Execute Stored Procedure process node at all.  In the expression rule you'd use the executeStoredProcedure function which is a little more lenient in its output - it simply spits out a data dictionary that you can parse and then deal with as you like.

Children