Is there any way to handle exception and continue process execution? In other words if error occurs i need to go to different route (route 2 on print screen). It is not possible to query db to check if error will occur or not.
Simplifies process model. In real case there are much more nodes after writing to db.
Discussion posts and replies are publicly visible
Please see below one of the approach that I can suggest. You can add delay after start node. If Write to DB breaks, after some time timer will start and trigger the flow.
Thanks for your response. One more question: what is the recommended way to check whether write to data store failed? query db?
Furman, Email alert Notification from Appian or after timer, add email Node, where you can customize the details and send.
sandeepd I don't need any email. I need to do other steps when write to data store failed. I need to make sure within one process whether it was completed or not.
FurmanUnfortunately we do not have any good solution for this.Kindly configure some rule or logic after start node to capture details.
Can we talk about why the heightened concern regarding write to data store (w2ds) failures?This is a long established product feature that's essentially reliable.
Are you experiencing a high frequency of failures in this node?
Robert Shankin let me provide more background related to what I want to achieve.
Imagine CDT with 2 fields (id, name1, name2). We faced situation that if two users started editing entry of this CDT and user1 change value for field name1, user2 change value for name2 field and then both click on submit button at the same time then write to data store entity updated entry in table and override values provided by one users with values provided by another user.
Initially I've tried to solve this problem by adding, just before write to data store entity, another node that was responsible to get latest version of CDT entry from db. This has not resolved the problem.
In real case scenario CDT has round 15 fields and updating them take 3-5 minutes.
Based on other Appian Community topics I thought about setting up locks. Steps that I want to fallow:
1. Create CDT with column on which unique constraint (text column) is added.
2. When user1 click on submit button then lock should be added by write to data store entity.
3. When second user click on submit button then write to data store entity will throw an error.
4. If error occurs i want to handle it and force process model to wait 1 minute and then get latest values for main CDT from db.
5. When write to data store is finished for user1 then lock is removed from db.
6. Before second write to data store for user2 locked is added by user2
I also though about using this solution on interfaces. When user click on item (for edit) user is informed that another user started editing this and and changes might be lost.
I'm open for any comments and suggesting who to address the problem in other way or how setup process model to avoid problem at all.
So from what you described, it sounds like you're trying to set up Optimistic Locking. Basically optimistic locking assumes that collisions are rare, so it just fails to write whenever two users attempt to update the same dataset. However, if you expect that simultaneous editing is common, I think you should consider using Pessimistic Locking.
Pessimistic locking pairs what you already have with functionality on your form to check if the data is already being edited. Then, you could use logic on the form to display a message or prevent users from completing the form at all. This should make the error case much less likely and probably make this design paradigm unnecessary.
There's lots of other posts about Optimistic / Pessimistic locking, but here's one that I think explains it pretty well.
From the above conversation I could understand we can't proceed to an exception flow when the node is paused or broken due to a technical error, so in this case may I know in what scenarios we can use the exception path defined for a node (ideally a smart service or user input task or script task). Much appreciate if you can provide an use case please.
© 2022 Appian. All rights reserved.