Skip to main content

Using Break Activity

The Break activity, when used inside a loop, the loop is immediately terminated, and the program control resumes at the next activity following the loop.

In a nested loop, a Break activity only stops the loop it is placed in. Therefore, if a Break is placed in the inner loop, the outer loop continues. However, if the Break is placed in the outer loop, all of the looping stops.

Let us understand Break activity with an example process. Here is an example that takes input as a number and displays its factors. A nested While loop is used and a Break is added to the inner loop once the factor is found and displayed.

Come, let's create this process in Process Designer:


Launch and create a new process in Process Designer

  • Launch Process Designer from the Windows Start menu located under IntelliBuddies Enterprise


Create New Process

  • Click on New Process and fill in the new process details


  • Add array variable to hold the input number and counters/index to get the factors

  • Int32 variable to hold counter and also to iterate.


In Activity panel search for Input Dialog


  • Add nested While loop to iterated numbers to find the factors.

  • Add condition using counter variable to outer While loop


  • Add Writeline to display the factors and finally count of factors.


  • Add Break in inner While loop.
  • Break condition becomes true when the iterate/counter number divides the input number. This counter value becomes one of the factor of number.


Save the process

  • From the Design tab ribbon, click on Save


Run the process

  • From the Design tab ribbon, click on Run


Ensure the process executes and displays the flower name and its index in the flower name array.

Download Example (C#)