Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:start:tasks:flow:loop [2017/06/14 18:51] admin [Configuration] |
en:start:tasks:flow:loop [2017/06/14 18:56] admin |
||
---|---|---|---|
Line 22: | Line 22: | ||
This loop is executed exactly 20 times. \\ | This loop is executed exactly 20 times. \\ | ||
- | Look at the initialization **(1)**. The **$loop** variable, which is handled internally, is one time set to 1 at the beginning of the loop. \\ | + | Look at the initialization **(1)**. The **$loop** variable, which is handled internally, is one time set to 1 at the beginning of the loop. |
- | Then directly the Finish condition **(2)** will be checked to check, if the loop must be executed at all. In this example I check if the **$loop** variable is lower or equal to 20, which is true, during the first execution. Let us skip **(3)** and come back later. \\ | + | |
- | Now the loop is executed. You could configure to execute the tasks you connect to the “Loop Path” Output. **(4)** \\ | + | Then directly the Finish condition **(2)** will be checked to check, if the loop must be executed at all. In this example I check if the **$loop** variable is lower or equal to 20, which is true, during the first execution. Let us skip **(3)** and come back later. |
- | One other option is to execute an expression during each iteration. **(4)** The expression you want to execute should be configured in **(6)**. You could use all function you have created and have access to **$loop**, $env and all fields of the current record. \\ | + | |
- | At least you could execute a workflow during each iteration, **(7)** which is disabled in this example. If you enable the checkbox, you will get a select box to configure the workflow you want to execute. \\ | + | Now the loop is executed. You could configure to execute the tasks you connect to the “Loop Path” Output. **(4)** |
- | If the iteration is done, the condition **(3)** (We skipped earlier) is executed and must return the new **$loop** value. Theoretically you could also use this expression field to run an expression in every iteration. Because you follow a clean and useful configuration, you should **not** do this. \\ | + | |
+ | One other option is to execute an expression during each iteration. **(4)** The expression you want to execute should be configured in **(6)**. You could use all function you have created and have access to **$loop**, $env and all fields of the current record. | ||
+ | |||
+ | At least you could execute a workflow during each iteration, **(7)** which is disabled in this example. If you enable the checkbox, you will get a select box to configure the workflow you want to execute. | ||
+ | |||
+ | If the iteration is done, the condition **(3)** (We skipped earlier) is executed and must return the new **$loop** value. Theoretically you could also use this expression field to run an expression in every iteration. Because you follow a clean and useful configuration, you should **not** do this. | ||
Now you could use this block, like this: | Now you could use this block, like this: | ||
- | {{ :en:start:tasks:flow:loop.png?nolink |}} | + | |
+ | {{:en:start:tasks:flow:loop.png?nolink |}} | ||
1 – This path will be executed one time during every iteration. There must not be any connection back to the loop at the end | 1 – This path will be executed one time during every iteration. There must not be any connection back to the loop at the end | ||
- | |||
2- This path will be executed at the end of the loop | 2- This path will be executed at the end of the loop | ||
+ |