Correct syntax for inputs when using Execute Stored Procedure in an expression rule

I need the correct format to create inputs when calling the Execute Stored Procedure plugin from an expression rule.  Here is my entire rule. I want to send an integer as an input (and ri!num is an integer) into a stored procedure and retrieve the results as the dataset is too large for Appian to handle comfortably.

a!localVariables(
  local!spResult: fn!executestoredprocedure(
    dataSourceName: "jdbc/Appian", 
    procedureName: "jsonValTest",
    inputs: {
      id: ri!num
    }
  ),
  local!result: if(
    local!spResult.success,
    local!spResult.result[1],
    local!spResult.error
  ),
  local!result
)


Here is my stored procedure:

The SQL query when run as a query minus any parameters works. Have I fouled the SQL procedure or do I have the syntax wrong on the execute stored procedure (or both)? Thanks in advance.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data