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
This will create a new folder called `workflows-tutorial`.
48
+
This will create a new folder called `workflows-starter`.
49
49
50
50
Open the `src/index.ts` file in your text editor. This file contains the following code, which is the most basic instance of a Workflow definition:
51
51
@@ -148,25 +148,24 @@ The term "Durable Execution" is widely used to describe this programming model.
148
148
149
149
Before you can deploy a Workflow, you need to configure it.
150
150
151
-
Open the `wrangler.toml` file at the root of your `workflows-tutorial` folder, which contains the following `[[workflows]]` configuration:
151
+
Open the `wrangler.toml` file at the root of your `workflows-starter` folder, which contains the following `[[workflows]]` configuration:
152
152
153
153
```toml title="wrangler.toml"
154
-
name = "workflows-tutorial"
154
+
#:schema node_modules/wrangler/config-schema.json
155
+
name = "workflows-starter"
155
156
main = "src/index.ts"
156
-
compatibility_date = "2024-08-20"
157
+
compatibility_date = "2024-10-16"
157
158
158
159
[[workflows]]
159
-
# The name of the Workflow
160
-
name = "workflows-tutorial"
161
-
# The binding name, which must be a valid JavaScript variable name. This will
162
-
# be how you call (run) your Workflow from your other Workers handlers or
163
-
# scripts.
160
+
# name of your workflow
161
+
name = "workflows-starter"
162
+
# binding name env.MYWORKFLOW
164
163
binding = "MY_WORKFLOW"
165
-
# script_name is required during for the beta.
166
-
# Must match the "name" of your Worker at the top of wrangler.toml
167
-
script_name = "workflows-tutorial"
168
-
# Must match the class defined in your code that extends the Workflow class
164
+
# this is class that extends the Workflow class in src/index.ts
169
165
class_name = "MyWorkflow"
166
+
# script_name is required during for the beta.
167
+
# Must match the "name" of your Worker at the top of wrangler.toml
168
+
script_name = "workflows-starter"
170
169
```
171
170
172
171
:::note
@@ -269,7 +268,7 @@ Because Workflows can be long running, it's possible to have running instances t
269
268
To trigger our Workflow, we will use the `wrangler` CLI and pass in an optional `--payload`. The `payload` will be passed to your Workflow's `run` method handler as an `Event`
0 commit comments