How to do Web Embed in Pega 24.2
- Go to App Studio and Create a case in Pega
- In the App Studio – Go to Channels – Create a Web Embed
- Create a Simple Website and place the folder into the tomcat – webapps folder of your personal edition. I have used Pega 8.7 and started the application.
Path to keep the index.html.
D:\PEGA8.7\InstallPega87\PRPCPersonalEdition\tomcat\webapps\MyWebEmbed
- Create a simple html page
- Generate the Web embed code from the Web Embed created at Step2
- Paste the Web embed code in the index.html
- In a browser run – http://localhost:8080/MyWebEmbed/index.html
Create a case
Create a Web Embed – use Authentication Service as SSO as am using community edition here
Click – Generate Web embed code – keep it in a notepad
Now go the the tomcat – webapps folder to create a simple HTML file
Open the index.html file in the MyWebEmbed folder
Content of Index.html is as below:
<!DOCTYPE html>
<html lang=”en-US”>
<head>
<title>My Simple HTML FOR Web Embed Demo </title>
</head>
<body>
<h1 style=”color:blue;font-size:60px;”>Welcome, To my blog mypegapoc.com.</h1>
<p style=”color:rgb(255, 55, 0);font-size:40px;”>MY SIMPLE POC on WEB EMBED in Pega 24.2</p>
<p style=”color:rgb(102, 0, 255);font-size:30px;”>Pega Mashup</p>
<!– Begin Pega content Web embed created in the community edition –>
<script src=’https://tczw9ahl.pegace.net/prweb/PRRestService/c11nsvc/v1/pega-embed.js’ ></script>
<pega-embed id=’theEmbed’ action=’createCase’ caseTypeID=’MyOrg-MyConste-Work-DemoProject’ themeID=’pzCosmosDefault’ casePage=’assignmentWithStages’ appAlias=’my-constellation’ pegaServerUrl=’https://tczw9ahl.pegace.net/prweb/’ autoReauth=’true’ authService=’SSO’ clientId=’14534242671243574897′ style=’width:100%’>
</pega-embed>
<!– End of Peg Web embed code–>
</body>
</html>
Now in the browser run the below URL – make sure the tomcat is up and running where you have kept the index.html file