Files
agent-framework/dotnet/tests/Microsoft.Agents.Workflows.Declarative.UnitTests/Workflows/LoopEach.yaml
T
Chris 4d63899812 .NET Workflows - Introduce support for Local variable scope (#944)
* Prepare for update

* Checkpoint

* Comments

* All fixed

* Mixed casre test added

* Rollback nuget

* Remove redundant restorable

* Namespace
2025-09-26 21:44:19 +00:00

29 lines
647 B
YAML

kind: Workflow
trigger:
kind: OnConversationStart
id: my_workflow
actions:
- kind: SetVariable
id: setVariable_count
variable: Local.Count
value: =0
- kind: Foreach
id: foreach_loop
items: =["a", "b", "c", "d", "e", "f"]
index: Local.LoopIndex
value: Local.LoopValue
actions:
- kind: SetVariable
id: setVariable_loop
variable: Local.Count
value: =Local.Count + 1
- kind: SendActivity
id: sendActivity_loop
activity: x{Local.Count} - {Local.LoopIndex}:{Local.LoopValue}
- kind: EndConversation
id: end_all