How does FaultHandlersActivity work? RRS feed

  • Question

  • When a FaultHandlersActivity is created, it just becomes a child activity of the parent activity. How does the FaultHandlersActivity work, though? What does it listen to to recognize the exception? When does that happen? Does it just have an empty Execute so nothing happens or doesn't something prevent it's Execute method from being called?

    I ask because I want to create additional aspects of a workflow, much like a Cancellation Handler or Fault Handler, where I might cause an event to happen and where ever the workflow might be, it goes into the defined handler.
    Thursday, November 13, 2008 7:41 PM

All replies

  • The FaultHandlersActivity won't be schedule in normal case, because it will be filtered in "EnabledActivities" property.

    The runtime will find and schedule the FaultHandlersActivity while exception happen.


    In your case, i am not very sure what do you mean "event". Do you mean you want to handler event by using HandleExternalEvent, but you want to use a workflow activity as a event handler?

    If it is your case, you can juse create a new type which will wrap the HandleExternalEvent. And schedule your handler while HandleExternalEvent is completed.


    Hope it is make sense to you.

    Friday, November 14, 2008 2:53 AM
  • The problem with HandleExternalEvent is that it's listening at one specific place in the workflow. For example, I want a single workflow to have a business logic aspect and a security aspect to it, in the same workflow, but separately identifiable. Fault and cancellation handlers have this with the notion of alternate flows, but I'm wondering if I can do something similar.
    Friday, November 14, 2008 4:35 PM