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
8 replies
Subscribers
5 subscribers
Views
4640 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Exception Handling
erick258
over 7 years ago
Hi, I'm making a simple process which contains of a single "User Input Task" node and a "Write to Datastore Entity" node, and when there is an error in the "Write to Datastore Entity" node, it is needed for the process to rollback to the "User Input Task" node with additional information about what the error is. Is there any way for it to be done?
Thanks.
OriginalPostID-235343
Discussion posts and replies are publicly visible
0
sindhug
A Score Level 2
over 7 years ago
Hi @erick258,use a process variable to save output of write to DataStore Entity node and call this pv in userinput task node.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
erick258
over 7 years ago
Hi @sindhug, afaik, when there is an error happens in the node, the node will not be activated, hence it can't save value into pv through the output tab.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sindhug
A Score Level 2
over 7 years ago
in that case please check log file.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
bhanuprakashm
over 7 years ago
Hi erick,
Please attached the error message.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sidhant Behura
over 7 years ago
@erick258 -
This requirement might not be feasible because whenever the "Write to Datastore Entity" node errors the process instance execution gets paused and there is an alert sent. And there is also no provision to access the SQL Exception at the output variable.
Due to this the exception mechanism in Appian wont work because it depends on 3 things Receive Message, Timer and Rule and we dont have enough information/data to trigger the exception flow.
But there is a way with which you can achieve your requirement but in a slightly different manner.
Put the "Write to Datastore Entity" node in a sub-process and configure a timer of 1 minute on the sub-process. In case the "Write to Datastore Entity" node inside the sub-process fails it will follow the exception flow and then you can configure another User Input Task to show an generic error like "Database Transaction failed." and then take measures to rollback.
Please refer the below link for more information.
/search?q=OriginalPostID-217893
Hope this information was helpful.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
erick258
over 7 years ago
@sidhantb I see, thanks for the response.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
gaurava322
over 7 years ago
Hi Eric: Did you tried using a!writeToDataStoreEntity(). I was just reading about it and will try to implement it and revert if i am successful.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
erick258
over 7 years ago
@gaurava322 Hi gaurava, sorry for the late reply. As far as I know, a!writeToDataStoreEntity() can only be used inside saveInto which it can't be applied if it is needed for the data to be verified before it is saved into the database.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel