Skip to content

Commit a79d8d6

Browse files
Merge pull request #52 from demirkayaender/feature_flags
2 parents 47e520b + e3a0e31 commit a79d8d6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repositories {
3535
dependencies {
3636
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
3737
errorprone("com.google.errorprone:error_prone_core:2.3.1")
38-
compile group: 'com.uber.cadence', name: 'cadence-client', version: '3.1.0'
38+
compile group: 'com.uber.cadence', name: 'cadence-client', version: '3.3.0'
3939
compile group: 'commons-configuration', name: 'commons-configuration', version: '1.9'
4040
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
4141
compile group: 'com.uber.m3', name: 'tally-core', version: '0.10.0'

src/main/java/com/uber/cadence/samples/hello/HelloSignal.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import static com.uber.cadence.samples.common.SampleConstants.DOMAIN;
2121

22+
import com.uber.cadence.FeatureFlags;
2223
import com.uber.cadence.client.WorkflowClient;
2324
import com.uber.cadence.client.WorkflowClientOptions;
2425
import com.uber.cadence.client.WorkflowOptions;
@@ -97,7 +98,11 @@ public static void main(String[] args) throws Exception {
9798
// ClientOptions.newBuilder().setRpcTimeout(5 * 1000).build();
9899
WorkflowClient workflowClient =
99100
WorkflowClient.newInstance(
100-
new WorkflowServiceTChannel(ClientOptions.defaultInstance()),
101+
new WorkflowServiceTChannel(
102+
ClientOptions.newBuilder()
103+
.setFeatureFlags(
104+
new FeatureFlags().setWorkflowExecutionAlreadyCompletedErrorEnabled(true))
105+
.build()),
101106
WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build());
102107
// Get worker to poll the task list.
103108
WorkerFactory factory = WorkerFactory.newInstance(workflowClient);

src/main/java/com/uber/cadence/samples/hello/HelloSignalAndResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
import org.apache.commons.lang.RandomStringUtils;
5151

5252
/**
53-
* Demonstrates signalling a workflow, and wait until it's applied and get a
54-
* response. This should be much performant(lower latency) than using signal+query approach.
55-
* Requires a Cadence server to be running.
53+
* Demonstrates signalling a workflow, and wait until it's applied and get a response. This should
54+
* be much performant(lower latency) than using signal+query approach. Requires a Cadence server to
55+
* be running.
5656
*/
5757
@SuppressWarnings("ALL")
5858
public class HelloSignalAndResponse {

0 commit comments

Comments
 (0)