chore: import upstream snapshot with attribution
dotnet-build-and-test / dotnet-test-functions (push) Has been cancelled
dotnet-build-and-test / paths-filter (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Debug, windows-latest, net9.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net8.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-foundry-hosted-it (push) Has been cancelled
dotnet-build-and-test / dotnet-build-and-test-check (push) Has been cancelled
dotnet-build-and-test / Integration Test Report (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:39:25 +08:00
commit db620d33df
5151 changed files with 925932 additions and 0 deletions
@@ -0,0 +1,24 @@
# Simple Workflow Sample
This sample demonstrates the basics of declarative workflows:
- Setting variables
- Evaluating expressions
- Sending output to users
## Files
- `workflow.yaml` - The workflow definition
- `main.py` - Python code to execute the workflow
## Running
```bash
python main.py
```
## What It Does
1. Sets a greeting variable
2. Sets a name from input (or uses default)
3. Combines them into a message
4. Sends the message as output
@@ -0,0 +1,33 @@
# Copyright (c) Microsoft. All rights reserved.
"""Simple workflow sample - demonstrates basic variable setting and output."""
import asyncio
from pathlib import Path
from agent_framework.declarative import WorkflowFactory
async def main() -> None:
"""Run the simple greeting workflow."""
# Create a workflow factory
factory = WorkflowFactory()
# Load the workflow from YAML
workflow_path = Path(__file__).parent / "workflow.yaml"
workflow = factory.create_workflow_from_yaml_path(workflow_path)
print(f"Loaded workflow: {workflow.name}")
print("-" * 40)
# Run with default name
print("\nRunning with default name:")
result = await workflow.run({})
for output in result.get_outputs():
print(f" Output: {output}")
# Run with a custom name
print("\nRunning with custom name 'Alice':")
result = await workflow.run({"name": "Alice"})
print("\n" + "-" * 40)
print("Workflow completed!")
if __name__ == "__main__":
asyncio.run(main())
@@ -0,0 +1,38 @@
name: simple-greeting-workflow
description: A simple workflow that greets the user
actions:
# Set a greeting prefix
- kind: SetValue
id: set_greeting
displayName: Set greeting prefix
path: Local.greeting
value: Hello
# Set the user's name from input, or use a default
- kind: SetValue
id: set_name
displayName: Set user name
path: Local.name
value: =If(IsBlank(inputs.name), "World", inputs.name)
# Build the full message
- kind: SetValue
id: build_message
displayName: Build greeting message
path: Local.message
value: =Concat(Local.greeting, ", ", Local.name, "!")
# Send the greeting to the user
- kind: SendActivity
id: send_greeting
displayName: Send greeting to user
activity:
text: =Local.message
# Also store it in outputs
- kind: SetValue
id: set_output
displayName: Store result in outputs
path: Workflow.Outputs.greeting
value: =Local.message