The host page can add event handlers that execute and perform custom processing when specific supported events fire, which helps you better integrate Pega UI with the host environment.
To listen on an event in the web embed, you can define an event listener on the
embedded HTML element using the
addEventListener() method on the
let elEmbedding = document.getElementById("theEmbed"); elEmbedding.addEventListener("embedready", handleEmbedReady);
- Occurs when assignment processing is complete. The
embedprocessingendevent fires only when case processing is complete, and not on each assignment screen or flow action transition.
- Occurs before the system displays the UI of the embed.
You can use
embedreadyto tell the host that the PCore infrastructure is ready, which means that the
setEmbedDatamethods can be used to adjust some displayed values. You can also use this event with the createCase action to get details about the current case and assignment IDs.
- Indicates that the refresh token has expired and that the user needs to be
presented with a login screen to continue the session.
popupReauthis true, the embed displays a credential challenge screen for the specified authorization service. If
popupReauthis set to false, the
embedreauthevent is fired.
- Occurs when the system detects a Next or Previous assignment submission.
- Occurs when the user clicks the Done button on a confirmation view.