Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 5 additions & 34 deletions exercises/hello-workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,19 @@ During this exercise, you will

You will create and make your changes to the code in the `practice` subdirectory. If you need a hint or want to verify your changes, look at the complete version in the `solution` subdirectory.

## Part A: Set up a new project using the Temporal package initializer
1. Download the `hello-world` project using the following command:

```
npx @temporalio/create@latest ./exercises/hello-workflow/practice
```

You will be prompted to answer a couple of questions. Respond in the following way:

```
Need to install the following packages:
@temporalio/[email protected]
Ok to proceed? (y)
y
```

```
Which sample would you like to use?
> hello-world
```

```
Would you like me to initialize a git repository for the project?
N
```

Once the project has been downloaded, you will see some suggestions for how to begin working with your Temporal Application.


## Part B: Review the Workflow Business Logic
## Part A: Review the Workflow Business Logic

1. Open the `workflows.ts` file (located in the `practice` subdirectory) in the editor.
2. Review the input parameters, business logic, and return value.

## Part C: Change the Task Queue Name for the Worker
## Part B: Change the Task Queue Name for the Worker

1. Open the `worker.ts` file (located in the `practice/src` subdirectory) in the editor
2. Change the task queue name to `greeting-tasks`
3. Save your changes
4. Repeat this process in the `client.ts` file

## Part D: Start the Worker
## Part C: Start the Worker

1. Go to a terminal window in the environment and change to the `exercises/hello-workflow/practice/src` subdirectory for this exercise
2. Run the following command to start the Worker:
Expand All @@ -58,7 +29,7 @@ Once the project has been downloaded, you will see some suggestions for how to b
npm run start.watch
```

## Part E: Start the Workflow from the Command Line
## Part D: Start the Workflow from the Command Line

1. Open another terminal window in the environment and change to the `exercises/hello-workflow/practice/src` subdirectory.
2. Run the following command:
Expand All @@ -71,7 +42,7 @@ This command starts the Workflow and prints the result.

If you have time, continue with the optional part of the exercise below to see how to view the result using `temporal`.

## Part F (Optional): Display the Result
## Part E (Optional): Display the Result
You can run the following command to display the result of a Workflow Execution:

```command
Expand Down