Abruptly terminates a workflow.



  • Display Name - Renames the activity.

  • Exception - The Exception Type shown when the exception is thrown. Only accepts Exception variable types.

  • Reason - The string value shown when the exception is thrown.


  1. Create a new workflow and save it as NewTerminateWorkflow.xml.
  2. Add a For Each<> activity inside the Sequence.
  3. Inside the Sequence, create a variable of the type System.Int32[] and give it the default value {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
  4. In the Values Property input field of the For Each activity, enter the variable name of the variable you created, e.g. variable1.
  5. Add a Sequence inside the For Each<> activity.
  6. Add an If activity inside the Sequence in the For Each<> activity.
  7. Enter item <= 5 in the Condition input field of the If activity.
  8. Add a Write Line activity inside the Then input field of the If activity and enter item.ToString in its Text Input Field.
  9. Add a Terminate Workflow activity inside the Else input field of the If activity.
  10. In the Terminate Workflow activity's Reason Misc Property, enter item > 5.
  11. When executed, the activities inside the Then field of the if activity will be executed while the Condition is met. When the Condition is not met, the Terminate Workflow activity will stop or terminate the execution of the workflow. 

    The use case should look like the following screenshot:

The output should look like this in the Output panel: