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
8 subscribers
Views
2260 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
If I develop a Smart Service plugin, I can pass in a javax.naming.Context object
guozhangy
over 10 years ago
If I develop a Smart Service plugin, I can pass in a javax.naming.Context object using Constructor, the Context object can be used to lookup the data source connection.
But when I develop Function plugins, can I also pass the Context object in Constructor? It's not mentioned in the document. Do anyone have experience to access the database inside Function plugins? The reason is we want to create a Function to access a BLOB column (The BLOB column is not supported by CDT)
Thanks.
OriginalPostID-140497
OriginalPostID-140497
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
There's an example in this plug-in
forum.appian.com/.../summary
The source code is inside the JAR and it's called ExecuteQuery.java
I would be really cautious with this, not sure what you are going to do with the retrieved data but if you're going to create a document in Appian with it you better use the RDBMS Blob Utility plug-in
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 10 years ago
ServiceContext should be first argument in the constructor. Yes, if required JDBC connection can be invoked from plug-in code. Try to minimize or avoid JDBC connections as you loose flexibility and increases maintenance in terms of configuration.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkateswarai917
over 10 years ago
If we want to use the database connections, Better to use the JNDO Lookup.. this is the best practice..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
guozhangy
over 10 years ago
Thanks all.
We want to have a link in the SAIL form, the link should download file from database and present to the user, while RDBMS Blob Utility can only be used in a Process Modal.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 10 years ago
Then you better develop a function plugin which will create the document from BLOB and return a document id. Then a download link can be given in the SAIL script
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel