Is your feature request related to a problem? Please describe.
Currently update handlers in Java are all run in their own threads. This means that if the update handler takes a long time and multiple updates are sent the workflow execution can consume lots of threads just waiting in update handlers.
Describe the solution you'd like
Support the ability to transform an update call into a Promise that can be completed later in another thread like the main workflow method .
Currently users can do this with the existing SDK API, but it will still consume a thread waiting for the result to return in the handle. If the SDK had a native API for this we wouldn't need to wait in the thread.
Ideally, the same API can be reused to complete the workflow asynchronously. This would allow workflows to be implemented fully async without tying up a thread when a workflow is cached.
Is your feature request related to a problem? Please describe. Currently update handlers in Java are all run in their own threads. This means that if the update handler takes a long time and multiple updates are sent the workflow execution can consume lots of threads just waiting in update handlers.
Describe the solution you'd like Support the ability to transform an update call into a
Promise
that can be completed later in another thread like the main workflow method .Additional context We have a similar feature to support async activities https://javadoc.io/doc/io.temporal/temporal-sdk/1.0.6/io/temporal/activity/ActivityExecutionContext.html#isUseLocalManualCompletion--
Currently users can do this with the existing SDK API, but it will still consume a thread waiting for the result to return in the handle. If the SDK had a native API for this we wouldn't need to wait in the thread.