elsa-core/samples/console/Elsa.Samples.ConsoleApp.LoopingWorkflows
2024-10-11 20:41:49 +02:00
..
Workflows Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
Elsa.Samples.ConsoleApp.LoopingWorkflows.csproj Enable Proto Actor Tracing for TraceLens (#5800) 2024-07-19 20:23:32 +02:00
Program.cs Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
Readme.md Move samples to repository root 2024-02-02 20:01:14 +02:00

Looping Workflows

This sample demonstrates three activities that can be used to model looping constructs.

For

The For activity executes a child activity for each step between a start and end value, similar to the following C# code:

for(var i = 0; i < 10; i++)
{
   // Logic to execute for each iteration.
}

ForEach

The ForEach activity executes a child activity for each item in a list, similar to the following C# code:

foreach(var item in items)
{
   // Logic to execute for each iteration.
}

While

The While activity executes a child activity for each iteration for as long as a certain condition evaluates to true, similar to the following C# code:

while(SomeConditionIstrue)
{
   // Logic to execute for each iteration.
}