Skip to content

Commit 82d021e

Browse files
committed
updating for CLI GA
1 parent 8f73c63 commit 82d021e

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

exercises/codec-server/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ the complete version in the `solution` subdirectory.
9494
Result:
9595
Status: COMPLETED
9696
Output: ["Received Plain text input"]
97+
ResultEncoding json/plain
9798
```
9899

99100
You now have a working Codec Server implementation. In the following steps,

exercises/custom-converter/README.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,23 @@ the complete version in the `solution` subdirectory.
4444

4545
```
4646
Progress:
47-
ID Time Type
48-
1 2024-03-14T16:01:21Z WorkflowExecutionStarted
49-
2 2024-03-14T16:01:21Z WorkflowTaskScheduled
50-
3 2024-03-14T16:01:21Z WorkflowTaskStarted
51-
4 2024-03-14T16:01:21Z WorkflowTaskCompleted
52-
5 2024-03-14T16:01:21Z ActivityTaskScheduled
53-
6 2024-03-14T16:01:21Z ActivityTaskStarted
54-
7 2024-03-14T16:01:21Z ActivityTaskCompleted
55-
8 2024-03-14T16:01:21Z WorkflowTaskScheduled
56-
9 2024-03-14T16:01:21Z WorkflowTaskStarted
57-
10 2024-03-14T16:01:21Z WorkflowTaskCompleted
58-
11 2024-03-14T16:01:21Z WorkflowExecutionCompleted
59-
60-
Result:
61-
Status: COMPLETED
62-
Output: ["Received Plain text input"]
47+
ID Time Type
48+
1 2024-08-26T20:28:51Z WorkflowExecutionStarted
49+
2 2024-08-26T20:28:51Z WorkflowTaskScheduled
50+
3 2024-08-26T20:28:51Z WorkflowTaskStarted
51+
4 2024-08-26T20:28:51Z WorkflowTaskCompleted
52+
5 2024-08-26T20:28:51Z ActivityTaskScheduled
53+
6 2024-08-26T20:28:51Z ActivityTaskStarted
54+
7 2024-08-26T20:28:51Z ActivityTaskCompleted
55+
8 2024-08-26T20:28:51Z WorkflowTaskScheduled
56+
9 2024-08-26T20:28:51Z WorkflowTaskStarted
57+
10 2024-08-26T20:28:51Z WorkflowTaskCompleted
58+
11 2024-08-26T20:28:51Z WorkflowExecutionCompleted
59+
60+
Results:
61+
Status COMPLETED
62+
Result "Received Plain text input"
63+
ResultEncoding json/plain
6364
```
6465

6566
You should now have an idea of how this Workflow runs ordinarily — it outputs
@@ -118,9 +119,10 @@ the complete version in the `solution` subdirectory.
118119

119120
```shell
120121
...
121-
Result:
122-
Status: COMPLETED
123-
Output: [encoding binary/snappy: payload encoding is not supported]
122+
Results:
123+
Status COMPLETED
124+
Result {"metadata":{"encoding":"YmluYXJ5L3NuYXBweQ=="},"data":"NdAKFgoIZW5jb2RpbmcSCmpzb24vcGxhaW4SGyJSZWNlaXZlZCBQbGFpbiB0ZXh0IGlucHV0Ig=="}
125+
ResultEncoding binary/snappy
124126
```
125127

126128
The `payload encoding is not supported` message is normal — the Temporal
@@ -139,9 +141,11 @@ add more features to it.
139141
2. To test your Failure Converter, change your Workflow to return an artificial
140142
error.
141143

142-
1. Add the following code after executing your Activity.
144+
1. Add the following import statement to your Workflow and code after executing your Activity in `ConverterWorkflowImpl.Java`.
143145

144146
```java
147+
import io.temporal.failure.ApplicationFailure;
148+
...
145149
throw ApplicationFailure.newFailure("Artificial Error", "Artificial Error");
146150
```
147151

@@ -193,9 +197,10 @@ add more features to it.
193197
10 2024-03-14T17:08:20Z WorkflowTaskCompleted
194198
11 2024-03-14T17:08:20Z WorkflowExecutionFailed
195199
196-
Result:
197-
Status: FAILED
198-
Failure: &Failure{Message:Encoded failure,Source:JavaSDK,StackTrace:,Cause:nil,FailureType:Failure_ApplicationFailureInfo,}
200+
Results:
201+
Status FAILED
202+
Failure
203+
Message: Encoded failure
199204
```
200205

201206
### This is the end of the exercise.

exercises/custom-converter/solution/src/main/java/customconverter/ConverterWorkflowImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ public String run(String input) {
2626
String result = activities.activity(input);
2727

2828
throw ApplicationFailure.newFailure("This is an artificial error", "Artificial Error");
29-
29+
3030
}
3131
}

0 commit comments

Comments
 (0)