Skip to content

Release v4.0.0

Latest

Choose a tag to compare

@shijiesheng shijiesheng released this 14 Oct 21:10
474f5d1

Highlights

Thrift Deprecation

Thrift support is now fully removed in Java client. (See why #985 ).

Migration Guide from V3

User facing APIs on workflow operations are mostly unchanged. But there are some BREAKING changes as list below.

Thrift to new Entities in API calls

For users to migrate easily, we generate a new set of entities with the same import path and similar interfaces.

  1. you can no longer access fields directly but instead have to use getter and setter explicitly.
  2. IWorkflowService will no longer throw TException but instead CadenceError; all other exceptions thrown are kept the same extended from CadenceError
  3. IWorkflowService uses com.uber.cadence.serviceclient.AsyncMethodCallback instead of org.apache.thrift.async.AsyncMethodCallback in callback methods.

Data Converter

If your workflow's input or output contains Thrift entities that extended from TBase, TEnum, TException. This is a BREAKING change. You'll need to add back the thrift adapters in your custom dataconverters. We no longer support them by default.

  1. We removed special TBase and TEnum adapter (first introduced to reduce payload size #263).
  2. We removed the ability to convert TException but instead you'll get a fallback type com.uber.cadence.client.ApplicationFailureException

Construct your client

  1. WorkflowServiceTChannel is now removed and replaced by WorkflowServiceGrpc
  2. If you use Grpc before, instead of new Thrift2ProtoAdapter(IGrpcServiceStubs.newInstance()) you can now use WorkflowServiceGrpc() directly.

What's Changed

New Contributors

Full Changelog: v3.12.7...v4.0.0