Updatable Await

Hi team,

I came cross this example code (samples-java/UpdatableTimer.java at master · temporalio/samples-java · GitHub) for how to set up an update timer. Wondering if we can do the same thing to update the duration in await function with unblockCondition (such as Workflow.await(Duration.ofDays(x), () → signalBeTrue)).


No, this is not going to work. The reason is that the condition is evaluated only on the workflow state changes, which are usually caused by external events like activity completion, signal, or timer.

Workflow.await creates a timer that fires on timeout. But this timer duration is not reevaluated.

1 Like