Closed Quinn-With-Two-Ns closed 2 days ago
@dandavison FYI The naming of this API may be relevant to your work on update with start
Is the name
executeUpdate
acceptable? We could also useupdate
orstartUpdate
the Java SDK is not very consistent here
The only place that the Java SDK uses "execute" AFAIK is WorkflowClient.execute
which returns a (future of) workflow result. So across all SDKs, we have a pattern that "execute" always means "returning result, not run/handle" (with the exception of Go's ExecuteWorkflow
which is a clear outlier -- if we were naming that nowadays we'd call it StartWorkflow
.) So that argues that, since the new methods added here return WorkflowUpdateHandle
, they should not have "execute" in their name.
So startUpdate
seems best here, since in Java we have the pattern untypedStub.startUpdate => UpdateHandle
and untypedStub.update => UpdateResult
.
Add type safe API to execute an async update workflow request.
Open questions we should resolve:
executeUpdate
acceptable? We could also useupdate
orstartUpdate
the Java SDK is not very consistent hereUpdateOptions
OK or do we want a new type here? Reusing is nice since it reduces the number of types, but has some redundant fields likename
, and type.closes https://github.com/temporalio/sdk-java/issues/2181