Skip to content

Commit 2f1fae0

Browse files
mfateevmeiliang86
authored andcommitted
Fixed README code sample (#275)
1 parent b1ea07b commit 2f1fae0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If this does not work, see instructions for running the Cadence Server at https:
2222

2323
## Get CLI
2424

25-
TODO
25+
[CLI is avaialable as an executable or as a docker image](https://github.com/uber/cadence/blob/master/tools/cli/README.md)
2626

2727
# Build a configuration
2828

@@ -31,12 +31,12 @@ Add *cadence-client* as a dependency to your *pom.xml*:
3131
<dependency>
3232
<groupId>com.uber.cadence</groupId>
3333
<artifactId>cadence-client</artifactId>
34-
<version>2.0.0</version>
34+
<version>2.4.0</version>
3535
</dependency>
3636

3737
or to *build.gradle*:
3838

39-
compile group: 'com.uber.cadence', name: 'cadence-client', version: '1.0.5'
39+
compile group: 'com.uber.cadence', name: 'cadence-client', version: '2.4.0'
4040

4141
# Overview
4242

@@ -113,8 +113,9 @@ public interface FileProcessingActivities {
113113

114114
void deleteLocalFile(String fileName);
115115
}
116-
117116
```
117+
It is recommended to use a single value type argument for activity methods. This way adding new arguments as fields to the value type is a backwards compatible change.
118+
118119
An optional @ActivityMethod annotation can be used to specify activity options like timeouts or a task list. Required options
119120
that are not specified through the annotation must be specified at run time.
120121

@@ -272,6 +273,8 @@ public interface FileProcessingWorkflow {
272273
void retryNow();
273274
}
274275
```
276+
It is recommended to use a single value type argument for workflow methods. This way adding new arguments as fields to the value type is a backwards compatible change.
277+
275278
## Starting workflow executions
276279

277280
Given a workflow interface executing a workflow requires initializing a `WorkflowClient` instance, creating
@@ -296,7 +299,7 @@ String result = workflow.processFile(workflowArgs);
296299
Asynchronous:
297300
```java
298301
// Returns as soon as the workflow starts.
299-
WorkflowExecution workflowExecution = WorkflowClient.asyncStart(workflow::processFile, workflowArgs);
302+
WorkflowExecution workflowExecution = WorkflowClient.start(workflow::processFile, workflowArgs);
300303

301304
System.out.println("Started process file workflow with workflowId=\"" + workflowExecution.getWorkflowId()
302305
+ "\" and runId=\"" + workflowExecution.getRunId() + "\"");

0 commit comments

Comments
 (0)