Description

   Exits a For Each loop activity.



Attributes

    Common

  • Continue on Error - True or False values to specify whether to continue executing the next activity even if an error is thrown on the current activity.

    Misc

  • Display Name - Renames the activity.


Example

  1. Create a new workflow and save it as NewContinueWorkflow.xml.
  2. Add a For Each<> activity inside the Sequence.
  3. Inside the Sequence, create a variable named of the type IEnumerable<Int32> and give it the default value {1,2,3,4,5}
  4. In the Values Input Field of the ForEach<> activity, enter x.
  5. Add an If activity inside the ForEach<> activity.
  6. In the Condition Input Field of the If activity, enter item <= 4.
  7. Add a Write Line activity inside the Then field of the If activity and enter item.toString in its Text Input Field.
  8. In the Else field, drag and drop the Continue activity. This will enable us to exit from the ForEach<> activity.
  9. When executed, the Sequence activity executes the ForEach<> activity inside it until the condition is met and we exit from the loop. 

    The use case should look like the following screenshot:


The output should look like this in the Output panel: