Files
osmedeus/test/testdata/workflows/events/simple-emitter.yaml
T
j3ssie 1403d20a4d feat: add LLM step executor with vision and tool support, event workflow system, and inheritance
- Add LLM executor supporting OpenAI vision, tool calling, embeddings, and structured outputs
- Introduce event emitter/receiver workflows with deduplication and filtering (generate_event functions)
- Add workflow extends/override system enabling inheritance chains and step merge modes
- Update function naming to snake_case across all testdata (fileExists→file_exists, etc.)
- Add comprehensive test fixtures for linter, events, CDN, step dependencies, and extends workflows
2026-01-20 18:23:57 +08:00

53 lines
1.6 KiB
YAML

# Simple Event Emitter Workflow
# This workflow demonstrates how to emit events that can trigger other workflows
name: simple-emitter
kind: module
description: Simple workflow that emits events for discovered assets
tags: event,emitter,example
params:
- name: target
required: true
steps:
- name: log-start
type: function
functions:
- 'print_green("Starting discovery for {{target}}")'
- name: discover-assets
type: bash
command: |
echo "api.{{target}}" > {{Output}}/assets.txt
echo "www.{{target}}" >> {{Output}}/assets.txt
echo "mail.{{target}}" >> {{Output}}/assets.txt
- name: emit-single-event
type: function
description: Emit a single event for a specific asset
functions:
- 'generate_event("{{Workspace}}", "discovery.asset", "simple-emitter", "subdomain", "new.{{target}}")'
- 'print_blue("Emitted single event for new.{{target}}")'
- name: emit-events-from-file
type: function
description: Emit events for each line in a file
functions:
- 'set_var("count", generate_event_from_file("{{Workspace}}", "discovery.asset", "simple-emitter", "subdomain", "{{Output}}/assets.txt"))'
- 'print_green("Emitted " + get_var("count") + " events from file")'
- name: emit-structured-event
type: function
description: Emit an event with structured JSON data
function: |
generate_event("{{Workspace}}", "discovery.complete", "simple-emitter", "summary", {
target: "{{target}}",
asset_count: 3,
status: "completed"
})
- name: log-complete
type: function
functions:
- 'print_green("Discovery complete for {{target}}")'