Reputation: 211
I have a workflow with a parallel activity, where one branch does work and the other has a receive activity that can shut the workflow down (is the proper way to do this with a HandleExternalEvent instead?). The problem, of course, is that if the receive activity is never called, the work branch completes and waits on the receive activity branch. How can I signal the other branch to close the activity? I've toyed a bit with using a listen activity to hold the receive activity and a custom event activity, but I'm missing something on how to make that work, as well.
Upvotes: 1
Views: 1132
Reputation: 74
You can use 'CompletionCondition", which is a parallel activity property that indicates whether parallel activity must finish if a branch ends.
You can check it here
Upvotes: 1
Reputation: 3624
You could cancel the listening activity on the alternate branch using the CancelActivity method on the ActivityExecutionContext object:
Upvotes: 0