Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version bump #22

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: temporalio/gitpod-edu:1.2
image: temporalio/gitpod-edu:1.3
tasks:
# task links a bash configuration file to a location that is not
# specific to this course (/etc/bash.bashrc sources it from there)
Expand All @@ -15,6 +15,14 @@ tasks:
--ui-port 8080 \
--db-filename /workspace/.cluster-persistence.db
openMode: tab-after
- name: Microservice
command: |
source /workspace/edu-interacting-with-workflows-java-code/.bash.cfg
cd utilities/microservice
mvn clean compile
echo "Translation Microservice running on this terminal"
mvn exec:java -Dexec.mainClass="translationapi.Microservice"
openMode: split-right
- name: Display Web UI
command: |
echo "Waiting for server...."
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For the exercises, make sure to run `temporal server start-dev --ui-port 8080 --
Samples
Directory Name | Description
:----------------------------------| :---------------------------------------------------------------------------------------------------------------------
`samples/custom-search-attributes` | [Shows a sample of how to use Custom Search Attributes to find queries where the order for pizzas has failed](samples/custom-search-attributes)
`samples/custom-search-attributes` | [Shows a sample of how to use Custom Search Attributes to find queries where the order for pizzas has failed](samples/custom-search-attributes/README.md)

## Reference

Expand Down
5 changes: 3 additions & 2 deletions exercises/async-activity-completion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ During this exercise, you will:
Make your changes to the code in the `practice` subdirectory (look for `TODO` comments that will guide you to where you should make changes to the code). If you need a hint or want to verify your changes, look at the complete version in the `solution` subdirectory.

### Prerequisites
This exercises uses the microservice from Temporal 102. If you are in the GitPod environment, this microservice is
already running. If you are _not_ using GitPod, you can start the microservice from a separate terminal by changing to
This exercises uses the microservice from Temporal 102. **If you are in the GitPod
environment, this microservice is already running.** If you are _not_ using
GitPod, you can start the microservice from a separate terminal by changing to
the `utilities/microservice` directory and using the following command:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ public static void main(String[] args) throws ExecutionException, InterruptedExc


// TODO: PART C: Read in the taskToken from args[0] and decode it from Base64
byte[] taskToken = Base64.getDecoder().decode(args[0]);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to be removed. This is the answer. It was accidentally left there.


// TODO: PART C: Get the translated text from args[1]
// TODO: PART C: Get the translated text from args[1] and use it to create a
// new TranslationActivityOutput object

ActivityCompletionClient activityCompletionClient = client.newActivityCompletionClient();

TranslationActivityOutput result = new TranslationActivityOutput(result);

// TODO: PART C: Call the `complete()` method using the `activityCompletionClient` object
// from above. The call should contain the `taskToken` and the `result`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public static void main(String[] args) throws ExecutionException, InterruptedExc

// Pass in the translated text as a command line argument and pretend to "verify"
// the results
String result = args[1];
TranslationActivityOutput result = new TranslationActivityOutput(args[1]);

ActivityCompletionClient activityCompletionClient = client.newActivityCompletionClient();

activityCompletionClient.complete(taskToken, new TranslationActivityOutput(result));
activityCompletionClient.complete(taskToken, result);

System.exit(0);
}
Expand Down
6 changes: 3 additions & 3 deletions exercises/querying-workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ temporal workflow query \

It will produce the same result:

```
```bash
Query result:
["Out for delivery"]
QueryResult "Out for delivery"
```

## Part E: Sending a Signal and Querying a Closed Workflow
Expand Down Expand Up @@ -129,7 +129,7 @@ completes successfully, then Query the closed Workflow.
5. You should get the result
```bash
Query result:
["Order complete"]
QueryResult "Order complete"
```

### This is the end of the exercise.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void main(String[] args) throws Exception {
// TODO: PART A: Set Workflow ID
PizzaWorkflow workflow = client.newWorkflowStub(PizzaWorkflow.class, "CHANGE_ME");

// TODO: PART A: Call fulfillOrderSignal, passing `true`
// TODO: PART B: Call fulfillOrderSignal, passing `true`

System.exit(0);
}
Expand Down
2 changes: 1 addition & 1 deletion samples/custom-search-attributes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Within the Pizza Workflow code, we will now dynamically update Search Attributes

## Part D: Running Your Workflow

1. In one terminal, run `mvn exec:java -Dexec.mainClass='customsearchattributes.PizzaWorker` to start the Worker.
1. In one terminal, run `mvn exec:java -Dexec.mainClass='customsearchattributes.PizzaWorker'` to start the Worker.
2. In another terminal and run `mvn exec:java -Dexec.mainClass='customsearchattributes.Starter'` to initiate execution of the Workflow. Now, try your query to retrieve the results. Recall that visibility is eventually consistent, so not all updates are going to be immediately reflected. If you don't see your update, wait a bit an try again.

## Part E: Querying Workflows by Search Attributes
Expand Down