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
+1
person also asked this
people also asked this
Replies
13 replies
Subscribers
7 subscribers
Views
6776 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
write directly from interface to DB
eliav
over 8 years ago
Hi All,
I have developed a SAIL interface that is be able to directly write to DB using the function
a!writeToDataStoreEntity(cons!NCContainmentAction,local!newContainmentAction)
the local!newContainmentAction is an object created locally as
local!newContainmentAction:fn!cast('type!{
www.pirelli.com/.../appian}NonConformityContainment',{})
This approach is very helpful because we are able to write directly on DB avoiding many other nodes witch, before using this approach, we used to elaborate data and write to DB
It also seems that SAIL code is simpler and faster to manage because we deal with the object and its attributes
I have never seen this kind of approach in Appian SAIL documentation so I would like to understand if it is correct and if you suggest or not to use it
Thank you in advance
Elia
OriginalPostID-249822
Discussion posts and replies are publicly visible
Parents
0
chetany
A Score Level 1
over 8 years ago
@eliav, I have tried using the returned values returned by onSuccess and onError. In case of a!writeTodataStoreEntity, the value returned is in fv!storedValues. I tries saving it to a local variable, and showing some message on UI when data is written successfully(based on the value that I am saving in the local variable onSuccess). It did not work. Its possible that I am doing something wrong.
The variable fv!storedValues will be populated only when the a!writeTodataStoreEntity function executes successfully - and this happens in async manner. Maybe that is why it is not working as expected.
About Point 2: I was saying that we can have a expression rule which will contain the processing logic - which we usually do in script tasks in Process model before writing to DB. The same can be done in an expression rule and the transformed value be passed to a!writeToDataStoreEntity.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
chetany
A Score Level 1
over 8 years ago
@eliav, I have tried using the returned values returned by onSuccess and onError. In case of a!writeTodataStoreEntity, the value returned is in fv!storedValues. I tries saving it to a local variable, and showing some message on UI when data is written successfully(based on the value that I am saving in the local variable onSuccess). It did not work. Its possible that I am doing something wrong.
The variable fv!storedValues will be populated only when the a!writeTodataStoreEntity function executes successfully - and this happens in async manner. Maybe that is why it is not working as expected.
About Point 2: I was saying that we can have a expression rule which will contain the processing logic - which we usually do in script tasks in Process model before writing to DB. The same can be done in an expression rule and the transformed value be passed to a!writeToDataStoreEntity.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data