how to launch a URL by passing POST method parameters to it in PEGA infinity 24.2 version

Hi everyone,

Business Requirement: Need to launch URL by passing POST method parameters on click of button or link in PEGA constellation 24.2 version.

In earlier versions, we used to implement this using open url in new window option by following approach mentioned in below article.

refer to (How can we launch a URL & pass parameters using HTTP POST instead of as query params in Pega PRPC 6.2 sp2 | Support Center)

step 1) Create HTML rule → in this have a logic to create a form to hold post method parameters, url and then submit this form using java script

step 2) Create activity and call above HTML using Show-HTML method

step 3) call the activity in open url in new window action

In PEGA infinity constellation 24.2 - I was able to achieve step 1,2 but there is no option to call the activity in constellation UI. when i run the activity in standalone manner in dev studio, i am able to launch the url in new window properly.

so how to call this activity on click of button or link in constellation ui so that url can be launched in new window with passed post method parameters.

On running activity rule specified in attached code snippet doc file in standalone manner able to launch window with url specified. But no option to call this activity on click of button or link in constellation UI.

So please share possible solutions/workarounds to achieve this in constellation UI 24.2

code snippet.docx (14.3 KB)

@VeerareddyK4067

In Pega Infinity Constellation 24.2, there is no direct option to call an activity from a button or link like in older versions. To launch a URL using POST method, you can still create an HTML rule that builds a form and submits it using JavaScript. Then, create an activity that uses the Show-HTML method to render this HTML. Since you can’t call the activity directly from the UI, you can expose it as a REST service and then use a custom web component or Web Embed section to call this REST API on button click. This will launch the URL in a new window with the POST parameters. Alternatively, host the POST logic outside Pega and call that service from the UI

@VeerareddyK4067I achieved this by creating custom dx component.