Using Temporal Java SDK
I am executing an await that must awaken either after 30s timeout OR if a signal that is received changes the value of a variable called ‘approved’ to true
Following is the code
Workflow.await(Duration.ofSeconds(30), () -> approved);
if (approved) {
logger.info("approved");
break;
}
When i look at the timeline on the UI, it seems as though the signal was received, and the further tasks that are supposed to occur after awakening of sleep also take place ( over here, another await is to be executed after the first await ends. And from the timeline, it looks like when the signal was received the next await started, as it should )
However, the first await is still shown as if it continues till the timeout i.e. 30s, even after the signal was received before the timeout.
Am I interpreting the UI timeline correctly? If so, Why is this happening and what does it mean?
I would appreciate your help on this.
Here is a screenshot of the UI timeline for reference: