Auto-submitting from custom React widget - Pega 23.1.1
My application is integrating with a 3rd party React Widget. When the widget completes, we need to submit the flow (as we just embed the widget in it's own flow action in a Control). We have it working by using pega.api.ui.actions.refreshHarness in a callback function that the widget calls when it's done.
The problem I'm having is that my application is using Customer Service, where Tasks are embedded above the interaction. If the user does anything on the interaction while the widget is processing, the refresh harness refreshes the interaction and doesn't submit the flow action in the task correctly.
Any ideas on how to implement this? The widget, after clicking their "Submit" button, calls some sort of API that takes ~5 seconds where the user can click on something in the interaction.