Files
agent-framework/dotnet/tests/Microsoft.Agents.Workflows.Declarative.UnitTests/Workflows/LoopEach.yaml
T
Chris 0f913bcdeb .NET Workflows - Integrate Element Aliasing (#835)
* Checkpoint

* Update test workflows

* Update workflows/MathChat.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update folder

* Cleanup

* Signed package version

* Rollback nuget.config

* Cleanup

* Set `ProductContext`

* Move product initialization.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-23 18:08:35 +00:00

29 lines
647 B
YAML

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