Skip to content

Conversation

@stephanos
Copy link
Contributor

@stephanos stephanos commented Dec 6, 2024

What was changed

Updated Java SDK to pull in new Update-with-Start API.

updateResult =
WorkflowClient.executeUpdateWithStart(
workflow::returnInitResult,
UpdateOptions.<TxResult>newBuilder().build(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner implementation!

}

@Override
public NexusOperationInboundCallsInterceptor interceptNexusOperation(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "correct" solution is these samples should be SimpleCountWorkerInterceptor extends BaseWorkerInterceptor

import io.temporal.internal.sync.BaseRootWorkflowInboundCallsInterceptor;

public class SimpleCountWorkerInterceptor implements WorkerInterceptor {
public class SimpleCountWorkerInterceptor extends WorkerInterceptorBase {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To provide a base implementation for Nexus.

@stephanos stephanos marked this pull request as ready for review December 7, 2024 01:17
@stephanos stephanos requested review from a team, antmendoza and tsurdilo as code owners December 7, 2024 01:17
.newWorkflowStub(
ClusterManagerWorkflow.class,
WorkflowOptions.newBuilder().setTaskQueue(testWorkflowRule.getTaskQueue()).build());
CompletableFuture<ClusterManagerWorkflow.ClusterManagerResult> result =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error for an unused variable 🤷

Copy link
Contributor

@steveandroulakis steveandroulakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early return client code updates look good

updateResult =
WorkflowClient.executeUpdateWithStart(
workflow::returnInitResult,
UpdateOptions.<TxResult>newBuilder().build(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner implementation!

@stephanos stephanos merged commit 69db545 into main Dec 10, 2024
8 checks passed
@stephanos stephanos deleted the new-uws-api branch December 10, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants