You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Flows are not the only way to write distributed programs that execute distinct jobs. Another approach is to write a program that defines the jobs and their dependencies, and then execute that program. This is known as workflows as code.
8
+
features:
9
+
[
10
+
'Define workflows as code in a single script intuitive and lightweight syntax.',
Copy file name to clipboardExpand all lines: docs/advanced/11_git_sync/cli_sync.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ import DocCard from '@site/src/components/DocCard';
6
6
7
7
# CLI Sync
8
8
9
-
You can use Windmill CLI to sync workspace to a git repository. Either with raw syncing using `wmill sync pull` & `wmill sync push` or with stateful syncing using `wmill sync pull --stateful` & `wmill sync push --stateful`.
9
+
You can use [Windmill CLI](../3_cli/index.mdx) to sync workspace to a git repository. Either with raw syncing using `wmill sync pull` & `wmill sync push` or with stateful syncing using `wmill sync pull --stateful` & `wmill sync push --stateful`.
| Set Tab | Array`<{id: string, index:number}>`| false | false |[]| The tabs to set. The id is the id of the Tabs component and the index is the tab index. |
66
66
67
-
### **Display a toast configuration:**
67
+
### Display a toast configuration
68
68
69
69
| Name | Type | Connectable | Templatable | Default | Description |
Copy file name to clipboardExpand all lines: docs/core_concepts/1_scheduling/index.mdx
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,9 @@ Managing scripts, flows and apps on Windmill works at the [workspace](../16_role
37
37
38
38
<br />
39
39
40
-
Cron jobs are one of **many ways to [trigger workflows](../../getting_started/9_trigger_flows/index.mdx) in Windmill** (among [webhooks](../4_webhooks/index.mdx), [auto-generated UIs][flows], [customized UIs][apps], [Command Line Interface](../../advanced/3_cli/index.mdx), [Slackbots](/blog/handler-slack-commands) etc.)
40
+
Cron jobs are one of **many ways to [trigger workflows](../../getting_started/9_trigger_flows/index.mdx) in Windmill** (among [webhooks](../4_webhooks/index.mdx), [auto-generated UIs](../6_auto_generated_uis/index.mdx), [customized UIs][apps], [Command Line Interface](../../advanced/3_cli/index.mdx), [Slackbots](/blog/handler-slack-commands) etc.)
41
41
42
-
:::
42
+
:::)
43
43
44
44
## Configure Schedules for Each Task ([Script][scripts], [Workflows][flows])
45
45
@@ -211,4 +211,4 @@ From a script or flow's Run page (after being [deployed](../0_draft_and_deploy/i
Copy file name to clipboardExpand all lines: docs/core_concepts/31_workflows_as_code/index.mdx
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
importTabsfrom'@theme/Tabs';
2
2
importTabItemfrom'@theme/TabItem';
3
3
4
-
# Workflows as code
4
+
# Workflows as Code
5
5
6
-

6
+
[Flows](../../flows/1_flow_editor.mdx) are not the only way to write distributed programs that execute distinct jobs. Another approach is to write a program that defines the jobs and their dependencies, and then execute that program. This is known as workflows as code.
7
7
8
-
Flows are not the only way to write distributed programs that execute distinct jobs. Another approach is to write a program that defines the jobs and their dependencies, and then execute that program. This is known as workflows as code.
8
+

9
9
10
-
One way of doing this is to use the API of windmill itself, to run jobs imperatively, using run_script and run_flow (their sync or async counterparts). This is a powerful way to define workflows, but it can be complex and verbose.
10
+
One way of doing this is to use the [API of Windmill](https://app.windmill.dev/openapi.html) itself, to run jobs imperatively, using run_script and run_flow (their sync or async counterparts). This is a powerful way to define workflows, but it can be complex and verbose.
11
11
12
-
It also require to define the different jobs in different scripts. This is why, Windmill supports to define workflows as code in a single script in both Python and Typescript using intuitive and lightweight syntax.
12
+
It also requires to define the different jobs in different scripts. This is why, Windmill supports defining workflows as code in a single script in both [Python](../../getting_started/0_scripts_quickstart/2_python_quickstart/index.mdx) and [TypeScript](../../getting_started/0_scripts_quickstart/1_typescript_quickstart/index.mdx) using intuitive and lightweight syntax.
13
13
14
-
The syntax is highlighted in the below examples, note that the subtask are indeed executed as distinct jobs, with their own logs, and their relationship with their parent task is recorded which allow for the timeline of each task to be displayed in the UI.
14
+
The syntax is highlighted in the below examples, note that the subtask are indeed executed as distinct jobs, with their own logs, and their relationship with their parent task is recorded which allows for the timeline of each task to be displayed in the UI.
15
15
16
-
To have some steps refer to other scripts and flows not in this file, use the normal functions `run_script` from the windmill SDK. The script below is a normal script and does not need special consideration. As such, it will already work with all the features of normal script and can be synced with the git and the CLI.
16
+
To have some steps refer to other scripts and flows not in this file, use the normal functions `run_script` from the windmill SDK. The script below is a normal script and does not need special consideration. As such, it will already work with all the features of normal script and can be [synced with the git](../../advanced/11_git_sync/index.mdx) and the [CLI](../../advanced/11_git_sync/cli_sync.mdx).
description="Trigger scripts and flows from webhooks."
@@ -93,24 +103,14 @@ On top of its editors to build endpoints, flows and apps, Windmill comes with a
93
103
href="/docs/core_concepts/worker_groups"
94
104
/>
95
105
<DocCard
96
-
title="Caching"
97
-
description="Caching is used to cache the results of a script, flow, flow step or app inline scripts for a specified number of seconds."
98
-
href="/docs/core_concepts/caching"
99
-
/>
100
-
<DocCard
101
-
title="Jobs"
102
-
description="A job represents a past, present or future `task` or `work` to be executed by a worker."
103
-
href="/docs/core_concepts/jobs"
104
-
/>
105
-
<DocCard
106
106
title="Workspace Secret Encryption"
107
107
description="When updating the encryption key of a workspace, all secrets will be re-encrypted with the new key and the previous key will be replaced by the new one."
Copy file name to clipboardExpand all lines: docs/flows/1_flow_editor.mdx
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,17 @@ In Windmill, each step is code with a main function in TypeScript, Python, Go, B
40
40
/>
41
41
</div>
42
42
43
-
<br />
43
+
<br/>
44
+
45
+
Another approach is to write a program that defines the jobs and their dependencies, and then execute that program. This is known as workflows as code.
46
+
47
+
<divclassName="grid grid-cols-2 gap-6 mb-4">
48
+
<DocCard
49
+
title="Workflows as Code"
50
+
description="Write a program that defines the jobs and their dependencies, and then execute that program within a script"
51
+
href="/docs/core_concepts/workflows_as_code"
52
+
/>
53
+
</div>
44
54
45
55
The Flow Editor has the following features which are the subject of specific pages:
0 commit comments