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
9 replies
Subscribers
5 subscribers
Views
4130 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Howdy. Is it possible to call/use the Update/Increment Constant smart service
hajii
over 10 years ago
Howdy. Is it possible to call/use the Update/Increment Constant smart service from within a SAIL component? So instead of calling it in a process node one would call it from sail code.
OriginalPostID-138018
OriginalPostID-138018
Discussion posts and replies are publicly visible
0
Jamie Loizou
Appian Employee
over 10 years ago
Not to my knowledge, but is it suitable for you to simply loop the user into the process, update the constant, then go back into the SAIL form (all chained)?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
hajii
over 10 years ago
What would be involved in exposing its api in sail? Yes it's all possible in a sail+node setup, however it would be better/cleaner (at least in my case) to take care of the constant usage where it's needed (eg on a button).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
Hi hajji, Consider using the startprocesswriter function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
hajii
over 10 years ago
Thanks but that'd be a bind to a process. Can't be done a server side function which has input and output?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
But to the best of my knowledge, this is the only way to interact with a process model from the sail code.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
siddharthg521
over 10 years ago
Hi Haji, you can make use of a table in the database instead of the constant. And then you can update/fetch the respective value from that table (instead of a constant) directly from your sail code using a custom function named - executequery() with which you can perform any SQL related operations.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
siddharthg521
over 10 years ago
And another way which I can think of if you want to call a process model directly from your sail code (and not make use of any table ) can be by exposing your particular process model (that has update constant smart service) as a web service and then call the webservice directly from the expression rule using the new webservice query function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
hajii
over 10 years ago
Would it also be possible for the plugin to expose some java/functions that can do the update?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Andrew P Gramann
Certified Lead Developer
over 10 years ago
If some of the process based approaches above really won't work for your use case, you could probably create a plugin to do this. The ContentService interface and Constant class in the APIs (
forum.appian.com/.../)
might be a good place to start your investigation if you choose to go this route.
It's worth noting that introducing custom plugins should be avoided when possible since it adds additional levels of complexity to your application.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel