ScriptsGuide

Overview and usage

Not everyone who runs a script needs to see its code. The Overview page is a script’s page for the people who operate it: the inputs form, the run’s output and logs, its runs live with what started each one, its state and its triggers — against the published version. And because scripts import, call and start one another, Waiso always knows what uses a script: the Used by tab lists it, the Code page marks scripts nothing uses, and a delete that would break something asks first.

What you will learn
  • Open a script’s Overview and run its published version there
  • Read the live runs list and what started each run
  • See who uses a script in Used by and find unused scripts
  • Delete a script safely — or on purpose, with force

A page for running, not editing

Open it from the editor: the gear Configuration → Overview (Run it and watch its runs, without the code). Its address is the script’s path with /overview at the end — /projects/acme/scripts/reports/daily/overview — so you can bookmark it or send it to a teammate. Nothing on the page edits code; Open editor at the top takes you back.

docs-demoCodehelloOverviewOpen editor
helloRuns here use the published version.
InputsVisualJSON
Ready to run · 1 inputRun script
RunsLive
TriggersEdit in editor →
APIOpen in API page
Another system starts this script with an HTTP request — copy the URL or the curl below.
POST/exec/p_58e3011e/hello
ModeSyncAuthBearerLimit60/minStatus
SchedulesOpen in Schedules
morning_helloWeekdays at 08:00Active
Add schedule
Events
Run this script when something happens elsewhere: an e-mail arrives, a database row changes, an MQTT message comes in.Add event trigger
The inputs form and the live runs list on the left, the triggers on the right.
PartWhat it does
InputsThe same typed form as the editor, for the published version’s inputs; Run starts a run of that version
Output and LogsThe result and log lines of the run you started or picked
RunsThis script’s runs, updated Live: Status, Run, Trigger, Started, Duration; All runs opens the Runs page filtered to it
StateThe values its runs keep — see State
TriggersThe API endpoint, schedules and event triggers, read-only, with Edit in editor

Run it and follow the runs

  1. Fill the inputs and run

    Fill the form and press Run. The run appears at the top of the list as Manual, and its output and logs fill the cards as it goes.

  2. Read who started each run

    The Trigger column wears a chip per run: Manual, API with the token name, Schedule with its name, Flow, E-mail, Database change, MQTT.

  3. Open an earlier run

    Click a row to show that run’s output and logs; Close this run goes back to the form.

Who uses a script

The editor’s Used by side tab — its count beside the name — answers “what breaks if I change this?”. It groups every place that uses the script, each marked Draft or Published:

  • Imported by — scripts that import it as a library.
  • Called through the SDK — scripts that run it with the SDK’s run call.
  • Flow steps — flow steps that run it.
  • Starts it — its schedules, API endpoint and event triggers.

Its intro says how many places use it, and a reminder: Changing it changes their drafts; their published versions keep the copy they were published with. A script nothing uses says Nothing imports, calls or starts this script.

Find what nothing uses

On the Code page, a script that nothing imports, calls, runs as a flow step, schedules or starts from the API or an event wears a Not used mark. The Code dashboard counts them in its Not used row — click it to list only those — and the filter menu has the same Not used filter. It is a hint for cleanup, not a verdict: a script you run by hand from the editor is still “not used”.

Deleting a script in use

Deleting a script that something uses is refused at first. The Code page shows a confirmation — This will affect other items — listing every usage with its kind and whether a draft or the published version depends on it, and warns Their next check or run fails with a broken import. Delete anyway deletes it; Cancel keeps it so you can point the users somewhere else first. Deleting a folder checks every script inside it the same way.

Through the API the same rule holds: a delete answers 409 with the code script_in_use and the usages list, and only ?force=true deletes regardless.

Shelldelete-script.sh
# Refused while something uses the script: 409 with the list
curl -X DELETE "$WAISO_URL/api/projects/$PROJECT_ID/scripts/$SCRIPT_ID" \
  -H "Authorization: Bearer $TOKEN"

# Deletes it anyway; whatever used it breaks on its next check or run
curl -X DELETE "$WAISO_URL/api/projects/$PROJECT_ID/scripts/$SCRIPT_ID?force=true" \
  -H "Authorization: Bearer $TOKEN"
Expected outputSuccessThe first call, while two items use the script
{
  "error": "this script is used by 2 item(s); use force=true to delete anyway",
  "code": "script_in_use",
  "usages": [
    "…"
  ]
}

Limits

  • The Overview page always runs the published version; to test a draft, use the editor.
  • Running from it needs permission to run the script; without it, Run says You can’t run this script.
  • Used by is computed when you open the tab, from the project as it is now.