Request/Response in Java SDK

Java SDK: what’s the most efficient way to implement request/response?

Currently, we send a signal from a workflow to a target workflow. The signal is sent from an activity, and we include that activity’s task-token in the payload. In the target workflow, when the signal has been “processed”, we send a response to the originating workflow. To do that, we again use an activity, and complete the original activity with ActivityCompletionClient.

I’m wondering if there is a better way. Looking at the golang “request/response” example here, this implies there is a more efficient solution. My question is: is there an equivalent with the Java SDK?

Many thanks!

For request/response using signals for this use case would be preferred over async activity completion.
One thing I would change is not to signal via activity but use external workflow stub:


We are planning to add an Update operation that will make this a lot simpler this year.