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.
This might require a working session to understand your implementation, review the component trigger points, and troubleshoot logs to ensure the data is updated correctly in the case.
I suggest creating an INC ticket and working with the Product support team.
As per your update, this issue occurs only when the user makes changes to the interaction case. I believe there is a conflict with the data sent in Etag, which is updated based on the user’s updates to the Interaction case. However, the react widget still holds the older value. Would it be possible to send the error message?
@RameshSangili The issue seems to be more aligned with the pega.ctx object changing. Our solution is to check if pega.ctx.strKey matches the pzInsKey of the case the control is embedded in. If it is, we submit the flow. If it doesn’t match, we create a UI element for the user to click that will submit the screen.