Run a flow¶
This page covers starting a flow and following its runs. Running a flow takes the Run flows permission on it; see Permissions. For run statuses and the API in full, see the Flows reference.
Run it by hand¶
- Click Save at the top of the flow builder. Run is unavailable while there are unsaved changes.
- Click Run.
- If the flow has variables, fill them in. Click a preset at the top of the dialog to fill in its values; the default preset's are filled in already.
- Click Run.
The run's page opens. To start a run from a preset directly, click its run button on the flow's Presets page.
Follow a run¶
The run's page shows the flow's tasks, each marked as it starts and finishes, and in its header how the run was started, by whom, and how long it took.
Click a task to see its details: when it started and how long it took, the graphs it wrote, the files it produced and, for a query, the query as it was run, and for a Set variables task, the variables it set. The same details are available over the API:
curl -H "Authorization: Bearer $TOKEN" "https://API/flows/taskInstances?runId=RUN"
All runs of a flow are listed on its Runs page, where they can be filtered by trigger, status and who started them.
To stop a run in progress, click Stop run on its page. Tasks that have finished keep what they wrote.
Find out why a run failed¶
- Open the run from the flow's Runs page. The task that failed is marked, and the run's header shows Failed; hold the pointer over it to read the error message.
- For more — a connector script's
script.log, say — click the task to read its details, or get them over the API as above. A file listed under a task'sartifactsdownloads fromhttps://API/flows/taskInstances/TASK/artifacts/ARTIFACT. - If a variable was wrong, run again with a different value; if a task was, fix it in the builder, save, and run again.
Whoever started the run gets an email, with the error message, when it fails or times out. To stop those emails, switch off Email notifications under General in your user settings.
Run it on a schedule¶
- Open Schedules in the flow's navigation and click Add Schedule.
- Give it a Label.
- Under Schedule, choose how often — every so many minutes or hours, or every day, week or month — and at what time, and choose the Timezone. The dialog lists the next five runs.
- If the flow has variables, fill in the values these runs use.
- Click Save.
The schedule runs as you, with your permissions. To pause it without losing it, switch off Enabled.
Run it when data is uploaded¶
- Open Hooks in the flow's navigation and click Add Hook.
- Give it a Label.
- Choose the Hook type: Asset is uploaded to a dataset, or Data is uploaded to a dataset for uploads on the dataset's Graphs page.
- Choose the Dataset to watch.
- If the flow has variables, fill in the values these runs use, or pick a preset to fill them in.
- Click Save.
The hook runs as you, with your permissions. A data upload starts one run for each graph it adds.
The first run shows Waiting for data upload to finish until the upload is done. Tasks can read
what was uploaded from the system variables: for
example, ?system_uploadedGraphIRI as the input graph of a SHACL validation. To pause a hook
without losing it, switch off Enabled.
Run it from another system¶
- Create an API token for an account that may run the flow.
- Open the flow's API page. It shows the address to call, and, once you fill in the variables, ready-made requests in cURL, Python and JavaScript.
-
Send a
POSTrequest to that address, with the token in anAuthorization: Bearerheader and each variable as a parameter:curl -X POST \ -H "Authorization: Bearer $TOKEN" \ "https://API/flows/blueprints/ACCOUNT/FLOW/run?dataset=iris"
The response describes the new run, including its id. To follow it, request
https://API/flows/runs/RUN; to stop it, POST to https://API/flows/runs/RUN/abort. The other
requests are listed under HTTP API.
A run started this way does not use the default preset. To use a preset's values, call
https://API/flows/blueprints/ACCOUNT/FLOW/triggers/PRESET/run instead.