Script Tasks
run:workflow
Section titled “run:workflow”Execute a child workflow by name. Input is passed through, output returned.
- name: run-sub type: run:workflow config: namespace: a3t name: a3t-templates-list input: org_id: "${ .org_id }" export.as: "."run:shell
Section titled “run:shell”Execute a shell command.
- name: check-disk type: run:shell config: command: "df -h / | tail -1" timeout: 10run:script
Section titled “run:script”Execute a script file in Lua, JS, or Python.
- name: process type: run:script config: language: lua source: /scripts/process.lua arguments: ["${ .input_file }"]inline:lua
Section titled “inline:lua”Embedded Lua script (~20us overhead). Access workflow state via state global.
- name: compute type: inline:lua config: code: | local a = state.input.a or 0 local b = state.input.b or 0 return { sum = a + b, product = a * b } export.as: "."inline:js
Section titled “inline:js”Embedded JavaScript (~100us overhead). Access input via input global.
- name: transform type: inline:js config: code: | const items = input.items || []; return { count: items.length, total: items.reduce((s, i) => s + i.value, 0) }; export.as: "."