Invalid column type: 1111 with Execute Store Procedure

Certified Senior Developer
Hi All,

I am getting issue while running fn!executestoredprocedure Appian function.While trying to call the executestoredprocedure, While testing the rule ,I get the error:
Invalid column type: 1111

I am facing the same issue with "Execute Stored procedure" smart service also,it shows the error message as follows:
There is a problem with task “Execute Stored Procedure” in the process “Test_SP”. java.sql.SQLException: Invalid column type

In the stored procedure I am using 2 parameters with 1st being In parameter which takes input and 2nd being out parameter which is table valued parameter.

I have given schema name along with procedure name and also provided the correct column name as input parameter

Please kindly provide solution for this issue. Thanks in Advance

OriginalPostID-255354


executedStoreProcedure code.txt

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    @sourav
    please make sure all the parameters mentioned in the stored procedure as IN
    should be exactly match the name and datatype.Any mismatch would result in wrong mapping error
  • 0
    Certified Senior Developer
    @ramanjaneyulut- In the stored procedure (Oracle db), I checked the input parameter it is fine, I have out parameter of type package object. For example GETTRTDETAIL(PackageNo IN VARCHAR2,Package_Tab OUT package_obj)
    When Out parameter is of type package object, it shows Invalid Column Type 1111. When I remove the out parameter, it return {}.I guess issue is with out parameter
    But I need to have out parameter of type object to return multiple column values.
    How to retrieve this out parameter or any other alternative solution?
  • 0
    Certified Senior Developer
    and type definition for Package_Obj is
    type packge_obj is object (param1 varchar2(100), param 2 varchar2(200));
  • 0
    Certified Lead Developer
    @sourav
    As per my knowledge, instead of returning Object(Package_obj), return the values(param1,param2) directly and map the same in Appian with same name and equivalent data type
  • 0
    Certified Senior Developer
    @ramanjaneyulut- Thanks for your suggestion,
    create or replace type package_tab is table of packge_obj;
    create or replace type packge_obj is object (param1 varchar2(100), param2 varchar2(200));
    We are returning type of "package_tab " from procedure because there are more than 100000 records which will be returned from procedure for certain scenario
    Is there any alternative solution? Please advise
  • souravs - I have had a bunch of problems figuring out the execute stored procedure plugin. I've had decent luck with the smart service running in a process, but using the function call has been very difficult for me. I can get the correct results running the stored procedure in a normal database tool and via the process model, but the function call is very finicky. When it works (perfectly coded select statement in the stored procedure, etc.) it is fast and runs fine, but just because the results are correct in the db & via the process model smartservice call does NOT mean that Appian will cleanly run it as a function. Be careful and thoroughly test if you are calling it via a function/rule. Also, per previous posts, do NOT attempt to do data insertion/updates via the function call, only select statements. The smartservice should be used if you have to update data.