Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
1810 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Iam trying fetch data to be displayed in a grid from a table which is in externa
divyav
over 9 years ago
Iam trying fetch data to be displayed in a grid from a table which is in external Database (not in Appian environment). We have data source name for it and stored procedure name but no other details. The current functionality is in Portal, where we are fetching data from that table through execute stored procedure smart service in a sub process. But now I need to implement it in 7.10 SAIL Interface. Within the same form I need to enter a firm name which will passed as input to that stored procedure and all details of that firm needs to be fetched from that and display in a grid.
Basically I need to know how to execute stored procedure in SAIL Interface.
OriginalPostID-183470
OriginalPostID-183470
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 9 years ago
The latest version of the plug-in has a function to call a store procedure as an option instead of the smart service
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
divyav
over 9 years ago
Thank you for providing the Plugin and function details
We have installed that jar file in our environment and I tried using the executestoredprocedurefunction in interface, but it is throwing error as "No procedure found with name: sp_Examples"
Code I have used for creating stored procedure is
CREATE OR REPLACE PROCEDURE sp_Examples(X IN OUT NUMBER) AS
T NUMBER;
BEGIN
T := X;
END sp_Examples;
/
DECLARE
A NUMBER:= 10;
BEGIN
sp_Examples(A);
DBMS_OUTPUT.PUT_LINE('A = ' || TO_CHAR(A));
END;
Code used for executestoredprocedure function is
with(
local!spResult:fn!executestoredprocedure("name of our data source",
"sp_Examples",
{{name:"X",value:1}}
),
if(local!spResult.success,local!spResult.result,local!spResult.error)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Try passing the stored procedure name with the schema prefix too. For example, if the stored procedure was created using schema "appianschema", pass its name as:
appianschema.sp_Examples
also make sure the account used to connect Appian with your RDBMS has access to "see" this stored procedure.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
divyav
over 9 years ago
Thanks for the above details.
We have tried providing schema name. Procedure name and able to establish connection with the stored procedure, but it is returning blank data.
When searched in Application-server logs, we are getting
"07:54:29,924 INFO [stdout] (http-/0.0.0.0:8080-9) 2015-12-14 07:54:29,924 [http-/0.0.0.0:8080-9] WARN com.appiancorp.common.monitoring.SailAggregatedDataCollector - recordTime called for an unknown endpoint. This means SAIL X-Ray logging is not fully implemented for that endpoint"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Ok that's progress. Since you're now usoing the schema name you are no longer receiving: "No procedure found with name: sp_Examples" which is good.
Now to verify why it is not returning data you can increase the logging level of the function so that the logs show you something useful; the WARN you posted is not related.
Just add this line to <APPIAN_HOME>\\ear\\suite.ear\\resources\\appian_log4j.properties at any location, e.g. line 20
log4j.logger.com.appiancorp.ps.function=DEBUG
wait 5 minutes and try again.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel