Skip to main content
Skip table of contents

Implementing a Loop

You can loop over parts of the activity diagram using decisions. This means that the actions that are part of the loop will be executed until a defined end condition has been reached.
The example below shows a simple loop over two action nodes.

In this example the user can enter a number of iterations. The service will then run a loop the specified number of times and display the result.

A counter is used to track the number of loop iterations. With each increase of the counter (increaseCounter) and with each loop iteration, a corresponding text line is appended (appendString) to a result string.
The decision node determines the end of the loop when the specified number of iterations is reached.

Activity_Loop_Example

Click here to download a simple example model that shows how to model a loop in activity diagrams with Scheer PAS Designer.

Related Content

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.