Skip to content

Conversation

@cretz
Copy link
Member

@cretz cretz commented Dec 16, 2024

What was changed

Added StartUpdateWithStartWorkflowAsync and ExecuteUpdateWithStartWorkflowAsync client calls and all that entails. Marked as experimental.

Checklist

  1. Closes UpdateWithStart SDK API #346

@cretz cretz requested a review from a team December 16, 2024 20:46
}

using (var activity = ClientSource.StartActivity(
$"UpdateWithStartWorkflow:{input.Options.StartWorkflowOperation.Workflow}",
Copy link
Member Author

Choose a reason for hiding this comment

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

@dandavison - note this differs from Go. In Go, this is UpdateWithStartWorkflow:<update-name> whereas here it is UpdateWithStartWorkflow:<workflow-name>. This latter behavior matches signal with start in both SDKs (i.e. it's SignalWithStartWorkflow:<workflow-name> not SignalWithStartWorkflow:<signal-name>), and of course inbound update does get its own span worker side. Not sure we even properly set tracing in any other update-with-start SDK.

Copy link
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

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

LGTM, I didn't see anything missing or out of line with the plan.

string id, string? runId = null, string? firstExecutionRunId = null);

/// <summary>
/// Start an update via a call to a WorkflowUpdate attributed method, possibly starting the
Copy link
Contributor

Choose a reason for hiding this comment

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

"via a call to a WorkflowUpdate attributed method" means "this will end up causing an update handler method to be executed in a workflow"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not exactly. What "via a call" means is that this is a lambda expression that makes a call to a method with the WorkflowUpdate attribute. So it looks like myClient.StartUpdateWithStartWorkflow((MyWorkflow wf) => wf.MyUpdateMethodWithAttribute(myArg), ....

@cretz cretz merged commit 855047e into temporalio:main Dec 17, 2024
8 checks passed
@cretz cretz deleted the update-with-start branch December 17, 2024 14:16
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.

UpdateWithStart SDK API

2 participants