Does anybody know how to model a for loop in an activity diagram? I tried with the Structured activity node “loop node”, but I can’t figure how to set it’s properties to model a for loop. Let’s say I want to model a loop for(index=1; i<100; i++), do I have to insert inside the loop node an activity for index=1, another one for i<100 and a third one for i++ and then to reference these activites in the corresponding loop node specification dialog box page (variables, setup part, test)?
You can model the for loop using “Loop Node with Nested Region”, where the Setup is the initial condition, Test is the loop condition, where the Body is the things will be do inside the loop.