nodes) and a list of arrows between them (edges), stored inside a session.
Prerequisites: a running server. If it uses API keys, add -H "X-API-Key: $YUKTA_API_KEY" to every curl.
Steps
1
Pick a trigger
A trigger starts the run.
API_TRIGGER emits the payload of the start request, SCHEDULE_TRIGGER ticks on a timer (Schedule a workflow) and CONSTANT_SOURCE emits fixed values.2
Add processors
Chain the plugins that fetch, transform, route or decide. The type string is used exactly as listed in the plugin reference. To see the options, ports and defaults of one plugin, ask the server:
3
End every path with a terminal
Every path must reach a terminal, such as
CONSOLE_TERMINAL. A workflow with no terminal is refused.4
Write it down
Save this as The fields are in the Workflow JSON reference. Only the node’s
session.json. It builds a greeting from the start payload:session.json
engine object is read by the server (retries, error routing, time limits: Node options); everything else in config belongs to the plugin.5
Check it, then apply it
The check takes one workflow (the object under Applying replaces the whole session with the same
workflows) and stores nothing; see Validate and roll back. Applying runs the same checks, so an invalid definition is never stored.sessionId: workflows you leave out are removed. To edit, read it with GET /api/sessions/demo/config, change it and send it back.6
Start a run
202 with the new executionId.Verify it worked
$EXEC is the executionId from the start call. The answer has "status": "SUCCESS" and a RESULT event from node end whose payload is {"greeting": "Hello, Ada"}. If the apply call answers 400, its message names the node and the option at fault.
Variations
- No input needed. Start from
CONSTANT_SOURCEinstead ofAPI_TRIGGER. - Group nodes in the UI. Give nodes a
group, or share an id prefix before the first dot (lint,lint.fail); display only. - Use the CLI or the web UI.
yukta-cli session apply session.json(CLI reference); the web UI renders a form from each plugin’s options and previews the graph. - Limits. 500 nodes and 2000 edges per workflow; names and ids up to 256 characters. The newest 20 versions of a workflow are kept.
Related
- Route and branch to send messages down different paths.
- Use variables and expressions to read message data and secrets in
config. - Sessions and workflows for how the pieces relate.