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
A Temporal Workflow is your business logic, defined in code, outlining each step in your process.
159
-
Activities are the individual units of work in your Workflow.
160
-
Activities often involve interacting with the outside world, such as sending emails, making network requests, writing to a database, or calling an API, which are prone to failure.
161
-
You can call Activities directly from your Workflow code.
162
-
If an Activity fails, Temporal automatically retries it based on your configuration.
163
-
160
+
Activities are the individual units of work in your Workflow.
161
+
Activities often involve interacting with the outside world, such as sending emails, making network requests, writing to a database, or calling an API, which are prone to failure.
162
+
You can call Activities directly from your Workflow code.
163
+
If an Activity fails, Temporal automatically retries it based on your configuration.
164
164
165
165
## 4. Run a Worker
166
-
With your Activity and Workflow defined, you need a Worker to execute them.
167
-
Create a file labeled `worker.rb`.
166
+
167
+
With your Activity and Workflow defined, you need a Worker to execute them.
168
+
Create a file labeled `worker.rb`.\
168
169
Workers, which are part of your application and provided by the Temporal SDK, then carry out the tasks defined in your Workflow.
Workers are a crucial part of your Temporal application as they're what actually execute the tasks defined in your Workflows and Activities.
195
+
Workers are a crucial part of your Temporal application as they're what actually execute the tasks defined in your Workflows and Activities.
195
196
For more information on Workers, see [Understanding Temporal](/evaluate/understanding-temporal#workers) and a [deep dive into Workers](/workers).
196
197
197
-
::: note
198
+
::: note
198
199
Start your Worker by running:
199
-
`ruby worker.rb`
200
+
`ruby worker.rb`
200
201
201
-
Keep this running in another terminal window.
202
+
Keep this running in another terminal window.
202
203
You should see output indicating that the Worker has started and is polling for tasks.
203
204
204
-
:::
205
+
:::
205
206
206
207
## 5. Execute a Workflow and See the Result
207
-
With your Worker running and listening for tasks, you can now trigger a Workflow execution.
208
-
This final step will validate that everything is working correctly with your file labeled `execute_workflow.rb`.
208
+
209
+
With your Worker running and listening for tasks, you can now trigger a Workflow execution.
210
+
This final step will validate that everything is working correctly with your file labeled `execute_workflow.rb`.
209
211
210
212
Run this script in a new terminal window with the following command: `ruby execute_workflow.rb`
211
213
@@ -237,16 +239,16 @@ puts "Result: #{result}"
237
239
Result: Hello, Temporal!
238
240
```
239
241
240
-
You've successfully executed your first Temporal Workflow.
242
+
You've successfully executed your first Temporal Workflow.
241
243
If you check the Temporal Web UI at http://localhost:8233, you'll gain visibility into your Workflow Execution with details listed about its progress and completion.
242
244
243
-
## Next Steps
245
+
## Next Steps
244
246
245
247
Now that your local environment is set up, you can explore the full capabilities of Temporal by following the [Getting Started with Ruby tutorials](https://learn.temporal.io/getting_started/ruby/).
246
248
These tutorials will walk you through building and running your first Workflows using the Ruby SDK.
247
249
248
250
If you would like to better understand the underlying concepts behind what you have built, visit [Understanding Temporal](/understanding-temporal), which provides a basic high level overview of how the Temporal works.
249
-
For more learning by doing, you can also explore our collection of [Ruby code samples](https://github.com/temporalio/samples-ruby) on GitHub.
251
+
For more learning by doing, you can also explore our collection of [Ruby code samples](https://github.com/temporalio/samples-ruby) on GitHub.
250
252
251
-
To take the next step toward building production-ready applications, check out the [Core Application section](/develop/ruby/core-application) of the Ruby Developer Guide.
252
-
This will help you understand how Temporal applications are structured.
253
+
To take the next step toward building production-ready applications, check out the [Core Application section](/develop/ruby/core-application) of the Ruby Developer Guide.
254
+
This will help you understand how Temporal applications are structured.
0 commit comments