Fault Activity => how to catch errors and propagate them out #2885
fulganta
started this conversation in
Design & tech
Replies: 1 comment 1 reply
-
Makes sense. Elsa 2 doesn't have a "catch any" activity, but Elsa3 will have this. For Elsa 2, the best thing you can do is implement a custom handler in your application that handles the For example: public class MyWorkflowFaultHandler : INotificationHandler<WorkflowFaulted>
{
public Task Handle(WorkflowFaulted notification, CancellationToken cancellationToken)
{
// Your HTTP call here.
}
} You can register your handlers like this:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a workflow that at the end reply to the client via http.
Issue is in case an activity fail, well no answer is sent. So I want that if any activity of my workflow fail, the end client is aware abut it.
Do you have such a logic implemented?
Otherwise, how can I catch the "fault" value out of my custom activity? Currently I just catch the "Done" value.
Thanks in advance for your help
Beta Was this translation helpful? Give feedback.
All reactions