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
4 replies
Subscribers
5 subscribers
Views
1572 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
@Version preventing the update
Dastagiri Dudekula
over 7 years ago
With the @Version annotation, the database detects that the value being stored by the current process is stale and prevents the update. How can I convey the message to user saying that your transaction is failed? How many ways I can do this in Appian?
OriginalPostID-246389
Discussion posts and replies are publicly visible
0
rodgraham
Certified Lead Developer
over 7 years ago
You can query the dB before saving and then compare the versions if no match create a task informing the user that their data won't be saved
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 7 years ago
What is your use case? Parallel execution of related actions on the same record?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 7 years ago
@dastagirid You may handle the error gracefully by making use of the 'onError' in the a!writeToDataStoreEntity(). Or you may place an timeout exception on the Write to Data Store Entity Smart Service and generate a task to User notifying about the exception. But is there a guarantee that the write to data store fails only because of the stale value associated with the field that has @Version annotation? If you are looking for locking concept, search the forum posts and you will be able to find some creative approaches formulated by @stefanh.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Dastagiri Dudekula
over 7 years ago
@stefanh791 Yes. It's parallel execution.
@sikhivahans Thank you I do try with given suggestions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel