Emit event
Publish an event onto the project bus.
- Kind:
emit - Palette: Flow
- Run it on its own: no, only as part of a graph
When to use
Section titled “When to use”- Telling the rest of the project that something happened, without knowing who listens: a
handler, a graph’s
trigger, or a run waiting on aneventnode. - Handing work from one graph to another without a direct call.
To start a known child and wait for its result, a workflow node is more direct.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
event |
string | yes | Event type to publish. |
payload |
any | no | Event payload (JSON). |
Output
Section titled “Output”The published event.
| Field | Type | Description |
|---|---|---|
event_id |
string | Id of the event that was published. |
Example
Section titled “Example”version: hyperspool-graph/v1nodes: - id: deploy type: shell config: { run: spool output set version=2.8.1 } - id: announce type: emit config: event: deploy.finished payload: service: checkout version: { $expr: "nodes.deploy.output.version" }edges: - { from: deploy, to: announce }Every handler on deploy.finished (or deploy.*) starts a run, and a run waiting for that type
in an event node can take it. See Events and handlers.
See the node reference for every other node.