Search

Search:

Namespace:

Search Result
.

http://msdn.microsoft.com/en-us/library/system.workflow.activities.replicatoractivity.allchildrencomplete.aspx

.

When using the UntilCondition you need to check the AllChildrenComplete property of the sender so see if all data has been processed.

.
        ElseIf replicator.AllChildrenComplete Then
.
  1. The ReplicatorActivity never stops if you don't tell it to. This is the behavior I most dislike with the ReplicatorActivity. Instead of just stopping and continuing with the next activity when all data is processed it just stops . Now this isn't the case when you don't have an UntilCondition, in that case every item is processed and when done it proceeds with the next activity just as you would expect. No with an UntilCondition you are responsible for stopping and to do so the UntilCondition is actually called one more time after the last item has been processed. The thing to check for is the AllChildrenComplete property of the ReplicatorActivity. When this is true all the data has been processed and you are responsible for stopping the ReplicatorActivity. Now this might not be hard but it always is a major point of confusion and, I presume, catches everyone at least the first time. And worse I can see no benefit at all for this behavior as the ReplicatorActivity just stops and the next activity is never scheduled. As far as I am concerned this is a big "bug" in the behavior of the ReplicatorActivity.
.

As you can see there is one additional UntilCondition at the end at which time the AllChildrenComplete property is set to true.