0

I am following the samples given in the java client sdk. Specifically https://github.com/uber/cadence-java-samples/blob/master/src/main/java/com/uber/cadence/samples/hello/HelloWorkerSetup.java

Compiler is not able to resolve Worker.Factory

I have tried to look in the client SDK code but I cannot seem to get past this error.

Has something changed in how workflows have to be registered?

Thanks Sanjay

Sanjay
  • 11
  • 2
  • I am leaving this post open hoping someone from Uber will see it. I resolved the issue by downgrading the SDK from 3.0 to 2.7.8. Just a fyi, that the code as available will not work with the 3.0 version. – Sanjay Apr 02 '21 at 08:16

1 Answers1

0
ClientOptions tOptions = ClientOptions.newBuilder().setHost(serverHostName).setPort(serverPort).build() ;
WorkflowServiceTChannel tChannel = new WorkflowServiceTChannel(tOptions);
WorkflowClientOptions clientOptions = WorkflowClientOptions.newBuilder().setDomain(serverDomain).build();
WorkflowClient wfClient = WorkflowClient.newInstance(tChannel,clientOptions);
WorkerFactoryOptions factoryOptions = WorkerFactoryOptions.newBuilder().build();
WorkerFactory factory = WorkerFactory.newInstance(wfClient,factoryOptions);
Sanjay
  • 11
  • 2