Updating the UI asynchronously

Is there some functionality in Moqui to update the UI asynchronously? I know you can call an async service, but that doesn’t update the UI after the service is finished. What options do we have in Moqui when we what to update the UI after a long running service, but we don’t want to freeze the UI while waiting?

AJAX polling: Start an async service, return immediately with a job ID, and have the UI periodically call another service to check whether it has finished. When complete, update the relevant UI component.

WebSocket/server push: If you need the UI to update immediately when the service finishes, a WebSocket-based mechanism can push an event/result to the browser. This requires more infrastructure than polling.

Background job + status entity: For longer processes, persist a job/status record (PENDING → RUNNING → COMPLETE/ERROR) and let the UI query it. This is generally more robust if the user can navigate away and come back.

Separate request for the final UI action: The async service itself doesn’t directly “refresh” the browser; the browser needs some mechanism—polling, push, or a subsequent request—to learn that the work is finished and render the result.