Skip to content

Node reference

A node is one step of a workflow. Its uses names the type and major version; with holds the inputs listed here. Outputs are read by later nodes as ${{ nodes.<id>.outputs.<name> }}.

HTTP requests, scripts and decisions run on one of your runners, inside the run’s container. Task, asset and approval nodes are carried out by StratoNext, with the permissions the workflow was published with.

stratonext.http.request@v1 calls a web API from the runner’s network, so private addresses work.

Input Required Meaning
url yes Absolute http:// or https:// URL.
method GET (default), POST, PUT, PATCH, DELETE or HEAD.
headers Request headers, name to value.
secret_headers Headers filled on the runner from its secrets: name to { secret, prefix }. The value never reaches StratoNext.
query Query string parameters, appended to the URL.
body Request body. Objects and lists are sent as JSON.
timeout Up to 30s. Defaults to 10s.
expect_status Accepted status codes, for example 2xx or 200,201,404. Defaults to 2xx.
response How to read the body: auto (JSON when it parses), json or text.

Outputs: status, headers, json, text, duration_ms.

A response outside expect_status fails the node. A timeout, a 408, a 429 or a 5xx is retried according to the node’s retry policy; other 4xx responses are not. Responses larger than 1 MB fail the node.

with:
url: https://api.example.com/v1/incidents
method: POST
secret_headers:
Authorization: { secret: EXAMPLE_API_TOKEN, prefix: "Bearer " }
body: { service: "${{ inputs.service }}", severity: "high" }

stratonext.script.run@v1 runs a script in the run’s container and exposes its exit code and output.

Input Required Meaning
script The script text, run with the chosen shell. Set this or asset.
asset The id of one asset of project to run instead of script. Set this or script.
shell bash (default), sh, pwsh or python.
project The project whose assets the step uses. Needed with asset and assets.
assets Ids of assets of that project. Each is downloaded into the working directory under its own name, executable, before the script runs, so an asset named deploy.sh runs with ./deploy.sh. Up to 64 MB each.
env Environment variables for the script, name to value.
secret_env Environment variables filled from secrets: variable name to secret name. On a runner of your own the value comes from the runner’s environment and never reaches StratoNext; on a hosted runner it comes from the workspace’s stored secrets.
working_directory Where the script runs: absolute (any directory of the image), or relative to the step’s own scratch directory, where it is created. Defaults to the scratch directory, which is empty when the step starts and removed when it ends. Steps do not share files: pass data through outputs.
timeout Up to 1h. Defaults to 10m.
expect_exit_code The exit code that counts as success. Defaults to 0.
aws Run the script with short-lived credentials for an AWS environment of the workspace. See below.

Outputs: exit_code, stdout, stderr, json, duration_ms. When stdout is valid JSON, json holds it parsed, which is the easiest way to pass numbers to a decision.

The shell must exist in the run’s image. The runner’s default image has bash, sh and python; name another container for pwsh. Secret values are masked in the output that is sent back.

with:
shell: bash
env:
MOUNT: /
script: |
set -euo pipefail
used=$(df -P "$MOUNT" | awk 'NR==2 { sub("%", "", $5); print $5 }')
printf '{"used_pct": %s}\n' "$used"

With aws, the script gets short-lived credentials for one AWS environment of the workspace in its environment variables, so the AWS CLI and SDKs work as they are:

with:
shell: bash
aws:
environment: env_prod_eu
permissions: # optional
- actions: [ecs:UpdateService]
resources: [arn:aws:ecs:eu-west-1:111122223333:service/prod/payments]
reason: Roll the payments service after the image build.
script: aws ecs update-service --cluster prod --service payments --force-new-deployment

Without permissions, the script gets the environment’s standard access. With them, the run waits until a person approves exactly those permissions, then the script gets them. Values are fixed when you publish, so a run can never ask for more than the workflow declares.

stratonext.asset.get@v1 reads an asset of a project: its metadata and a download URL that is valid for a few minutes. Changes nothing.

Input Required Meaning
project yes The project that holds the asset.
asset yes The asset id, picked from the project’s assets in the editor.

Outputs: asset_id, name, description, media_type, size, project, download_url, summary.

To run an asset rather than read it, give its id to a script node’s assets.

stratonext.decide@v1 picks a branch with ordered rules. Over plain facts it is deterministic. With questions, a model first answers them about the facts, and the rules read its answers.

Input Required Meaning
state yes The facts to decide on, usually outputs of earlier nodes. Structured data, not prose. Rules read it as state.<field>.
questions Question id to { type, instructions, criteria }, where type is noul (yes or no, as a probability), choice or score. Omit for a deterministic decision.
thresholds Named values the rules read as thresholds.<name>, so a number used by several rules is set in one place. A value may be an expression such as ${{ vars.sensitivity }}.
decide Ordered rules { when, choice }. The first match wins; a rule without when is the default.
uncertain { when, then } for a judgment too close to call. then is fail or { choice }.
on_error fail (default) or { choice }: the branch to take when no decision can be made.

Outputs: choice, matched_rule, uncertain, degraded, answers. Question types: noul (yes or no, read as answers.<id>.noul, from 0 to 1), choice (one of the criteria, read as answers.<id>.choice) and score (a position on the criteria scale, read as answers.<id>.score).

Later nodes branch on the choice with if: ${{ nodes.<id>.outputs.choice == 'escalate' }}.

A deterministic decision:

with:
state:
used_pct: ${{ nodes.measure.outputs.json.used_pct }}
thresholds:
max_used_pct: ${{ vars.max_used_pct }}
decide:
- when: ${{ state.used_pct >= thresholds.max_used_pct }}
choice: full
- choice: fine

A decision with questions runs on a runner that holds your JEV key as the secret STRATONEXT_SECRET_JEV_KEY; such a runner gets the judging label automatically (see Runners). The key stays on your runner and usage is billed to your own JEV account. If the model cannot be reached, the decision takes the on_error branch.

with:
state:
components: ${{ nodes.summary.outputs.json.components }}
our_service: ${{ inputs.service }}
questions:
customer_facing:
type: noul
instructions: Is a component that our customers depend on degraded or down?
severity:
type: score
instructions: How severe is the impact right now?
criteria: [none, minor, partial outage, full outage]
thresholds:
customer_facing: 0.7
major: 1.5
decide:
- when: ${{ answers.customer_facing.noul >= thresholds.customer_facing && answers.severity.score >= thresholds.major }}
choice: escalate
- choice: log
on_error: { choice: escalate }

A decision may ask up to 10 questions over 64 KB of state.

stratonext.approval.request@v1 pauses the run until a person approves or rejects going on. The request appears on the Approvals page, and the workspace admins and the workflow’s creator are notified. It is never approved automatically.

Input Required Meaning
title yes What the approver is asked, for example “Deploy payments-api to production?”. Up to 255 characters.
message Context for the approver, such as outputs of earlier nodes. Up to 4000 characters.
risk low, medium (default), high or critical, shown to the approver.

Outputs: approval_id, decision, decided_by, notes, decided_at.

Approved, the node succeeds and the run goes on. Rejected, the node fails with approval_rejected; if nobody decides within the node’s timeout (24 hours by default), it fails with approval_expired. Either way the run stops, unless the node sets continue_on_error.

While every open step waits for an approval, the run shows as Waiting for approval. The runner lets go of it meanwhile and takes other runs, so a pending approval never holds a runner. Once the approval is decided, the run is queued again, usually within seconds, and continues on the first available runner that has its labels, in a new container. Runners before version 15.2 keep the run and wait instead.

approve:
needs: [plan]
uses: stratonext.approval.request@v1
with:
title: "Deploy ${{ inputs.service }} to production?"
message: "${{ nodes.plan.outputs.stdout }}"
risk: high

stratonext.task.create@v1 creates a task in the workspace, optionally dispatches it to an agent, and can wait for it to finish.

Input Required Meaning
name yes The task name.
description yes What the task is about. The agent receives it.
instructions Additional instructions for the agent.
project The target project. A task needs a project or at least one environment.
environments Target environment ids.
assignee The agent that executes the task.
verification_criteria What the agent checks to confirm the task succeeded.
dispatch Send the task to its assignee right away. Defaults to true when an assignee is set.
wait_for created finishes the node once the task exists; completed waits until the task finishes, within the run’s 24 hour limit.

Outputs: task_id, status, result, summary.

With wait_for: completed, a task that ends failed or cancelled fails the node. The task shows the workflow as its creator and links back to the run. A task a workflow creates is read-only on its environments: its agent can read, but not change, what it finds.

stratonext.task.get@v1 reads a task of the workspace. Changes nothing.

Input Required Meaning
task yes The task id, usually ${{ nodes.<id>.outputs.task_id }}.

Outputs: task_id, status, finished, name, assignee, project, result, summary.

stratonext.task.cancel@v1 cancels a task of the workspace; an agent working on it is told to stop. A task that already finished is left as it is.

Input Required Meaning
task yes The task id.
reason Why, recorded in the task’s worklog.

Outputs: task_id, status, previous_status, cancelled.

stratonext.workflow.run@v1 starts a run of another workflow of the same workspace, using that workflow’s published version, and by default waits for it to finish. Use it to share one set of steps between several workflows, or to split a long workflow into parts.

Input Required Meaning
workflow yes The id of the workflow to start. It must be written out, not computed by an expression.
inputs Inputs of the started run, input name to value. They are checked against the started workflow’s on.manual.inputs.
wait_for completed (default) waits until the started run ends; started finishes the node as soon as the run is queued.

Outputs: run_id, workflow_id, version, status, error.

With wait_for: completed, the node succeeds when the started run succeeds, and fails when it fails, times out or is cancelled. While the node waits, the runner lets go of the run, so the started run can use the same runner. If the run that started it is cancelled or fails first, the started run is cancelled too. A run started with wait_for: started keeps running on its own.

The started run shows workflow as its trigger. ${{ trigger.payload }} holds the workflow_id, run_id and node_id of the step that started it.

deploy:
uses: stratonext.workflow.run@v1
with:
workflow: wfl_8Kq2mZ
inputs: { service: "${{ inputs.service }}", region: eu-west-1 }

A workflow may not start itself, either directly or through the workflows it starts, because its runs would start new runs forever. Publishing such a workflow is refused, and the error names the chain, for example deploy → verify → deploy. The same check runs when you restore an earlier version and when you run a draft. A chain of runs starting other runs can be at most 5 runs deep; a node that would go deeper fails with workflow_depth_exceeded.

A workflow acts with its own identity. When you publish, StratoNext checks that the workflow is allowed to do what its nodes do, such as create and dispatch tasks, read assets or start other workflows, and refuses the publish otherwise. A node that reads or changes a task or asset can only reach those of its own workspace.