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
7 subscribers
Views
2268 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi I want to catch an exception value in a variable. for example if
sunnya
over 11 years ago
Hi
I want to catch an exception value in a variable. for example if I am calling a web service and if the connection fails. I want to log the error message in a Process variable How can I achieve it and also how the exception handling is done through rules or receive message.
It will be great if anybody could help as this is urgent. Thanks in Advance ...
OriginalPostID-95150
OriginalPostID-95150
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 11 years ago
You can do it by capturing the Fault object. This is available in the Outputs tab in the Call Web Service node.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
You can add a new custom output to the Call Web Service smart service, use this expression:
xpathsnippet(ac!Fault,"//faultstring/text()")
and save it in a process variable.
Make sure to enhance this expression to handle cases where the ac!Fault is null
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sunnya
over 11 years ago
thanks eduardo, suppose I have been thrown a exception in a query rule how will I handle that or how can I take the value of that in my process variable
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
When an activity fails an alert is generated to notify the relevant parties for it to be corrected. There's no automatic exception handling for this type of activities (in contrast to the Call Web Service Node which has a retry logic and a Fault object). For more information on Exception Handling review the following link
forum.appian.com/.../Exception_Handling
You can still add logic to your model to take actions when there's a failure but the implementation of such mechanisms depends on the design of the model. For instance, let's say you know Script Task A runs a query rule; you could add a custom output to store a "success" flag in a process variable and monitor this variable after X hours (through a timer), let's say that based on your model if this flag is still null or false after those X hours then you can consider something happened with the Script Task and you can configure your flow to notify you or take other actions.
Other people may have other ideas on how to handle failures on nodes but they will all depend on the design of your model.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel