Question
Cognizant Technology Solutions
IN
Last activity: 21 Apr 2022 4:47 EDT
Facing issue to launch harness using "pega.api.ui.actions.launchHarness" inside Pega using custom section
We have used custom script function as part of CTI implementation in our application. This was working fine prior to upgrading the Pega platform from 8.4.5 to 8.6.2 and it stopped working post upgrade.
We encountered "Unregistered request" in the security alert log.
We had deactivated when rule “pyBlockUnregisteredRequests” to solve the issue temporarily.
To make a sophisticated solution we have already registered few actions (such as activity invocation through asynch call using the method “httpRequestAsynch”) used in the custom script to fix it. But now we are facing issue to launch harness using "pega.api.ui.actions.launchHarness(options)" inside Pega using custom section.
To register the data transform as given in the below code snippet we had tried to follow the steps as given in the article (https://docs-previous.pega.com/security/85/configuring-custom-control-using-rule-form
&
https://docs-previous.pega.com/security/85/submitting-action-request-content-encrypted-form)
but it didn't work. So, looking for some assistance here.
Code Snippet without registering any action:
We have used custom script function as part of CTI implementation in our application. This was working fine prior to upgrading the Pega platform from 8.4.5 to 8.6.2 and it stopped working post upgrade.
We encountered "Unregistered request" in the security alert log.
We had deactivated when rule “pyBlockUnregisteredRequests” to solve the issue temporarily.
To make a sophisticated solution we have already registered few actions (such as activity invocation through asynch call using the method “httpRequestAsynch”) used in the custom script to fix it. But now we are facing issue to launch harness using "pega.api.ui.actions.launchHarness(options)" inside Pega using custom section.
To register the data transform as given in the below code snippet we had tried to follow the steps as given in the article (https://docs-previous.pega.com/security/85/configuring-custom-control-using-rule-form
&
https://docs-previous.pega.com/security/85/submitting-action-request-content-encrypted-form)
but it didn't work. So, looking for some assistance here.
Code Snippet without registering any action:
function fname()
{
var params = {harness:"<harnessname>",
harnessClass:"<harnessclass>",
displayMode:pega.api.ui.constants.NEW_DOCUMENT,
tabName:{value: "<tab name>", isProperty: false} ,
windowName: "<window name>",
readOnly: false,
dataTransform: {name: "<DTName>", parameters: [{name: "TabName", value: "<tabname>", isProperty: false}, {name: "Index", value: "<index>", isProperty: false},
{name: "HomeContext", value: "<value>", isProperty: false}]}
};
pega.api.ui.actions.launchHarness(params);
}
@PegaRules-4 Can you confirm that you also see security error SECU0019 AND 403 unauthenticated errors despite having registered the activity?
Can you confirm that you are running on Cosmos?
Because if so, I believe I've identified the possible product BUG-686452 which has already been corrected in Pega 8.6.3.
It relates to registration happening for launch harness in the correct thread when a case object having a launch harness is opened in new tab in cosmos userportal. This is relevant for scenarios where Show-harness is confibgured in a popup window and a 403 unauthenticated error is seen on the activity pzTransformandRun even though the activity is registered.
In 8.6.3 we ensure the proper portal name is passed to new tabs when BAC is used.
Would you be able to install and test your scenario on 8.6.3?