@@ -7,26 +7,21 @@ These are some samples to demonstrate various capabilities of Java Cadence clien
7
7
## Overview of the Samples
8
8
9
9
* ** HelloWorld Samples**
10
- * _ HelloActivity _ is a sample of a single activity workflow
11
- * _ HelloActivityRetry _ demonstrates how to retry an activity
12
- * _ HelloAsync _ is a sample of how to call activities asynchronously and wait for them using Promises.
13
- * _ HelloAsyncLambda _ is a sample of how to run a part of a workflow asynchronously in a separate task (thread).
14
- * _ HelloAsyncActivityCompletion _ is a sample of an asynchronous activity implementation.
15
- * _ HelloChild _ is a sample of a child workflow
16
- * _ HelloException _ demonstrates exception propagation and wrapping
10
+ * HelloActivity is a sample of a single activity workflow
11
+ * HelloActivityRetry demonstrates how to retry an activity
12
+ * HelloAsync is a sample of how to call activities asynchronously and wait for them using Promises.
13
+ * HelloAsyncLambda is a sample of how to run a part of a workflow asynchronously in a separate task (thread).
14
+ * HelloAsyncActivityCompletion is a sample of an asynchronous activity implementation.
15
+ * HelloChild is a sample of a child workflow
16
+ * HelloException demonstrates exception propagation and wrapping
17
17
* HelloQuery is a sample of a query
18
18
* HelloSignal is a sample of sending and handling a signal.
19
19
* HelloPeriodic is a sample workflow that executes an activity periodically forever.
20
20
21
21
* ** FileProcessing** -- shows a workflow for media processing use case. The sample workflow
22
- downloads a file from an Amazon S3 bucket, creates a zip file and uploads that zip file back to
23
- S3. The sample uses the task routing feature. Requires AWS credentials .
22
+ downloads a file, processes it and uploads result to a destination. Demonstrates how to route activities to a
23
+ specific host .
24
24
25
- * ** SplitMerge** -- the workflow in this sample processes a large data set by splitting it up into
26
- smaller data sets. The sample calculates the average of a large set of numbers stored in a file in
27
- S3. The smaller data sets are assigned to workers and the results of processing are merged to
28
- produce the final result. Requires S3 credentials.
29
-
30
25
## Build Samples
31
26
32
27
We are working on getting [ cadence-client library] ( https://github.com/uber-java/cadence-client ) into a public Maven repository.
@@ -39,44 +34,8 @@ These are some samples to demonstrate various capabilities of Java Cadence clien
39
34
40
35
to build the samples. Verify that they actually can run:
41
36
42
- ./gradlew -q execute -PmainClass=com.uber.cadence.samples.hello.HelloActivity
37
+ ./gradlew -q execute -PmainClass=com.uber.cadence.samples.common.RegisterDomain
43
38
44
-
45
- ## Configuring Service and S3 Access Keys
46
-
47
- If you are running local container the HelloWorld samples do not need any additional configuration.
48
-
49
- The steps for configuring and building other samples for Java Cadence Client are:
50
-
51
- 1 . Open the ` access.properties ` file in the ` samples ` directory.
52
-
53
- 2 . Update Cadence host and port values to a service API. Keep these values for a local Cadence service:
54
-
55
- Cadence.host=127.0.0.1
56
- Cadence.port=7933
57
-
58
- 2 . If planning to run samples that access S3 locate the following sections and fill in your Access Key ID and Secret Access Key.
59
-
60
- # Fill in your AWS Access Key ID and Secret Access Key for S3
61
- # http://aws.amazon.com/security-credentials
62
- S3.Access.ID=<Your AWS Access Key>
63
- S3.Secret.Key=<Your AWS Secret Key>
64
- S3.Account.ID=<Your AWS Account ID>
65
-
66
-
67
- 5 . Save the ` access.properties ` file.
68
-
69
- 6 . Set the environment variable ` AWS_SWF_SAMPLES_CONFIG ` to the full path of the directory
70
- containing the ` access.properties ` file.
71
-
72
- On Linux, Unix or OS X, use this command to set the environment variable:
73
-
74
- export AWS_SWF_SAMPLES_CONFIG=<Your SDK Directory>
75
-
76
- On Windows run this command:
77
-
78
- set AWS_SWF_SAMPLES_CONFIG=<Your SDK Directory>
79
-
80
39
## Prerequisite
81
40
Run Cadence Server using Docker Compose
82
41
0 commit comments