HI,
We have a requirement as to perform batch operations such as making external API calls for entries passed in a request. We need to guarantee that all API calls would go through and not fail and only failed API calls needs to be retried, not all. So for such a scenario would child workflows come into use. Where each call would create a child workflow to do changes and handle retries based on failure. Is this a good approach to look at? Are we able to check the state of the child workflow to help show on the UI the progress of the batch operation?
I don’t think you need child workflows in this case. The service retries activities according to their retry options. So you just start all these activities in parallel and wait for all of them to complete.
Promise has callback interface similar to CompletableFuture. So you can call promise.handle to chain multiple calls.
Another option is to use Async.function to start multiple parallel threads. Note that having too many blocked parallel threads in a workflow might affect the worker performance negatively.