I am trying to use Windows Workflow and have a model that looks similar to the image in the link below:
After each of the Send Activities (GetSomthing
, GetSomthingElse
, GetSomeMoreStuff
) the same custom activity is being called (LogSomthingBadHappened
).
While it might not look so bad in this picture in my real model the custom activity is a SequenceActivty, has quite a few nodes, and when its repeated 3 times starts to make the workflow look very ugly.
I would like to do something like this:
Can the IfElse
branches be merged like this?
Should I be using a State Machine work flow instead (haven't figured these out yet)?
Best Answer
Use a FaultHandler on the workflow and throw a specific exception type that the handler will catch. Not the most graceful, but I think it should work.