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
2290 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi All, I am going through the SAIL recipes. I am currently studying the bind()
chetany
A Score Level 1
over 10 years ago
Hi All, I am going through the SAIL recipes. I am currently studying the bind() function.
The recipe is given on the forum at this link .
forum.appian.com/.../SAIL_Recipes.html
In that recipe, a getter function is used which gets employees from web service. Also a setter function is used, which allows the user to post the updated employee information back to the web service (whenever the variable bounded using bind() function is saved into.)
bind() enables us to achieve this elegantly.
My question is:
Assume I am getting the data from a data source using queryEntity() instead of a web service. For writing back the updated data to the web service we use webservicewrite(), which returns a writer (as is expected from a setter rule) .
Since I am using a database as my source instead of a webservice, How can I write my updated data back to the...
OriginalPostID-130520
OriginalPostID-130520
Discussion posts and replies are publicly visible
Parents
0
siddharthg521
over 10 years ago
Hi Chetan,
Yes, there exists a custom plugin function named - executequery - which you can use anywhere across your sail code/expression rules to do any type of database related operations.
It simply takes the datasource name and the sql query to execute as it's arguments.
PS: The output if this function is in form if JSON and hence you need to use some JSON extract functions to extract the necessary values from the returned JSON output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
siddharthg521
over 10 years ago
Hi Chetan,
Yes, there exists a custom plugin function named - executequery - which you can use anywhere across your sail code/expression rules to do any type of database related operations.
It simply takes the datasource name and the sql query to execute as it's arguments.
PS: The output if this function is in form if JSON and hence you need to use some JSON extract functions to extract the necessary values from the returned JSON output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data