Question
Datacom
NZ
Last activity: 4 Oct 2018 13:54 EDT
Switch Application Dynamically
I want to setup a url link in a section - On Click of which, I want the system to change the Application - basically simulate the same functionality which happens when we use the 'Switch Application' button ( Option available in drop-down when we click on the Operator Name in the portal ). The url link will refer a Case ID in a different application - so the requirement is to open the Case ID in the New Application portal on Click of the url.
I have tried using the same script 'switchApplication' that is used in the Switch Application Menu item with the New Access group passed as parameter to the script - its just creating a new thread and opening the case as a New tab in the existing application. I believe this is because it is NOT deleting the threads corresponding to my existing application.
So my requirement is that - On Click of the url referencing the Case ID , I want the Case ID to be opened in the New Application portal.
There should NOT be any reference to the previous application in the portal once I click the url link.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi
Are you trying to open the case in a new portal altogether keeping the existing portal intact ? Or do you want to repaint the existing portal with the new one and then show the work item ?
Datacom
NZ
I want to repaint the existing portal with the new one and then show the work item
Pegasystems Inc.
IN
Hi
When I am trying to switch to new app, i can see that the thread remains same but the information gets changed.
For me. both the access groups are attached to my operator id.
Can you confirm whether the same from your end ?
Datacom
NZ
I can see that when I Switch the Application from the Operator Menu the following System Pages are getting refreshed correctly with the details of the New Applictaion and the New Acess group.
- Application
- AccessGroup
But when I try to run the same script On Click of the Case ID url, these pages are still pointing to the Old application/Access group and the Case ID opens as a New tab in the Old Portal.
Please let me know how I can verify if the Thread is the same.
Datacom
NZ
Santanu Bhattacherjee Any addiiotnal pointers on the same ?
Pegasystems Inc.
IN
Hi
I need to try replicating it at my lab machine. Give me some time. Will get back to you with my findings.
-
Arpit Sharma
Datacom
NZ
Santanu Bhattacherjee I think one of the reasons the portal refresh is NOT happening properly is because the portal harness itself if defined as a Screen Layout and we are NOT able to run any script/activity to have the entire Screen Layout refreshed with the new Access Group.
Datacom
NZ
Santanu Bhattacherjee Please let me know whether you got a chance to test this out in your lab. I have tried multiple options but none seems to be working.
Pegasystems Inc.
IN
Hi Vivek
Sorry to get back late on this.
Well, at my end I tried to see the kind of problem you are facing but was not able to see it. i am even not sure whether i am following the right steps or not.
Can you share the script that you are using to switch the portal .
Note.. if the script contains any customer specific data / info then you may want to remove them and replace with more generic one.
Datacom
NZ
Details of the steps that I tried is provided below.
A Link Control is configured in a Section as below – based on my understanding of the info that Eric Osman has also provided in the discussion.
Full Location parameter passed below is "pyActivity=Data-Portal.ShowDesktop"
An operator is configured with 2 Access Groups
Portal when Operator logs in – corresponding to default Access Group. ( NOT the access group passed as parameter for RedirectAndRun activity )
Details of the steps that I tried is provided below.
A Link Control is configured in a Section as below – based on my understanding of the info that Eric Osman has also provided in the discussion.
Full Location parameter passed below is "pyActivity=Data-Portal.ShowDesktop"
An operator is configured with 2 Access Groups
Portal when Operator logs in – corresponding to default Access Group. ( NOT the access group passed as parameter for RedirectAndRun activity )
I create a New Case in this application TS Sandbox.
On creation of the New Case, the section is shown with the Link control that is configured
On Click of this link, I want the portal to refresh to show the New Application portal exactly the way it happens when using Switch Apps menu
But what I get is as shown below.
In the same Tab where the case was open, the New Portal corresponding to the target application to which I want to switch to is opening.
The original portal does NOT get overlaid by the portal of the application to which I am switching to .
Pegasystems Inc.
IN
Hi Vivek, Good morning!
- could we attempt the similar configuration of onClick event referred at Switch application for calling RedirectAndRun via Runscript instead of Refresh - CurrentHarness? and learn the behavior.
- RULE-FILE-TEXT WEBWB PZDESIGNERSTUDIOTOPLEVELSCRIPTS!JS
Please share your thoughts/comments, Thank you!
psahukaru
Datacom
NZ
Phani Sahukaru Santanu Bhattacherjee
Tried with the below configuration. This is the same configuration used in Switch Apps menu option. But result is the same. Portal is refreshed on the tab already open with the case.
Pegasystems
US
Take a look at the RedirectAndRun activity and the ShowDesktop activity. But be careful about inadvertently throwing away threads you need (see the java step at the end of RedirectAndRun). /Eric
Datacom
NZ
I have tried running RedirectAndRun ( without any changes ) on Click of the case ID url but was unssucessful.
Is there any particular parameter I need to set when calling RedirectAndRun to make this happen.
And regarding SHowDesktop, shoudl I be calling it after calling RedirectAndRun ?
Pegasystems
US
If you use tracer, it will show you which thread is doing each step. As far as the details to set when calling the activities yourself, you may want to first trace an example of an existing portal performing the switch-application operation, and then do it similarly in your own code. /Eric
Pegasystems
US
The case manager portal has both a switch-app and a switch-portal menu, so if you trace both of those, it should show some useful mechanism for implementing your own. When you test your own, make sure you test the scenario where you start in one portal, launch a second portal, use your implementation of switch app in that second portal, then click back to the original portal (not switch to it with a menu item but click on the original window or tab!) and make sure the original portal is still operating properly AND that your second portal tab or window remains intact if you expected it to. /Eric
MacIf
FR
Hello,
In some case i have already use Redirect and run to change the WorkGroup.
//Changement de Workgroup
var oSafeURL = new SafeURL("FW-Work.ChangeEOT");
oSafeURL.put("WorkGroup",WorkGroup);
var sReturn = httpRequestAsynch( oSafeURL.toURL());
var oShowDesktopUrl = new SafeURL("Data-Portal.ShowDesktop");
var oRedirectUrl = new SafeURL("RedirectAndRun");
oRedirectUrl.put("ThreadName","");
oRedirectUrl.put("bPurgeTargetThread","true");
oRedirectUrl.put("Location",oShowDesktopUrl.toQueryString());
window.location.href = oRedirectUrl.toURL();
In my case it's raplcaing the portal with a same one but with a different Workgroup.
During the activity ChangeEOT, i open the Operateur and change some property like the workgroup. In your case you can choose to change the accesgroup,but i haven't already try this.
Maybe it could help you.
Pegasystems
US
What version of Pega are you on? Are you still having trouble with this? If so, we should see if HFix-22614 and HFix-23690 would help. Even if the versions of those hotfixes are not exactly the same as your Pega version, since they affect both ShowDesktop and RedirectAndRun, and are not extensive changes, it would not be hard for you to temporarily do a private-checkout and manually make the small changes to quickly see whether those changes help you.
As I'm on the train and about to get off, I can look a bit later at exactly what the changes are. I know the change in RedirectAndRun concerns how it determines in its last java step whether to clean up other threads or not. /Eric
Updated: 25 Apr 2016 9:39 EDT
Datacom
NZ
Yes Eric Osman unfortunately I am still having issues.
I am on V 7.1.5.
Datacom
NZ
Eric Osman Arvind Balakrishnan
Hi Eric - Could you please provide the hot-fixed version of ShowDesktop and RedirectAndRun - so that I can try running them at my end ?
BNYMellon Technology
IN
Eric Osman I will be taking over the issue from Vivek. Can you provide us the hot-fixed version of ShowDesktop and RedirectAndRun. We will do a private Checkout of the rules ... apply the changes and check if its resolving the issue.
Pegasystems
US
This is strange. I thought I had posted something.
The two changes are, one in showdesktop, one in redirectandrun. I can't guarantee they will work for you. But it's worth a try. Do a private checkout of each, and make sure you find the exact "original code" that I show here. If not, don't even attempt to make any of the changes to either rule.
Showdesktop original step 5 precondition should say if Param.ThreadName!="OpenPortal" continue whens else skip step.
Change the precondition to be two lines. The first one should say if Param.ThreadName=="STANDARD" skip whens else continue whens. The second one should say if Param.ThreadName == "" && pxThread.pxThreadName == "STANDARD" continue whens else skip step.
redirectandrun last step, a java step, should contain many lines INCLUDING the excerpt shown below that DON'T start with "!>". You should replace the line starting with "<!" with the ones starting with "!>". This is output from windiff. And of course neither your original code or the new code should actually have the "!>" or "!<" marks in it. /Eric
String loc = tools.getParamValue("Location");
if (loc.contains("ShowDesktop")) {
strAction = "switchApplication";
}
if (!("openAssignment".equals(strAction)
|| "openWorkItem".equals(strAction)
This is strange. I thought I had posted something.
The two changes are, one in showdesktop, one in redirectandrun. I can't guarantee they will work for you. But it's worth a try. Do a private checkout of each, and make sure you find the exact "original code" that I show here. If not, don't even attempt to make any of the changes to either rule.
Showdesktop original step 5 precondition should say if Param.ThreadName!="OpenPortal" continue whens else skip step.
Change the precondition to be two lines. The first one should say if Param.ThreadName=="STANDARD" skip whens else continue whens. The second one should say if Param.ThreadName == "" && pxThread.pxThreadName == "STANDARD" continue whens else skip step.
redirectandrun last step, a java step, should contain many lines INCLUDING the excerpt shown below that DON'T start with "!>". You should replace the line starting with "<!" with the ones starting with "!>". This is output from windiff. And of course neither your original code or the new code should actually have the "!>" or "!<" marks in it. /Eric
String loc = tools.getParamValue("Location");
if (loc.contains("ShowDesktop")) {
strAction = "switchApplication";
}
if (!("openAssignment".equals(strAction)
|| "openWorkItem".equals(strAction)
|| "openWorkByHandle".equals(strAction)
|| "displayOnPage".equals(strAction) || "switchApplication"
<! .equals(strAction)))
!> .equals(strAction))
!> && !"true".equals(tools
!> .getParamValue("bSkipCleanUpAllThreads")))
((com.pega.pegarules.priv.context.PegaRequestor) tools
.getRequestor()).cleanUpAllThreads();
}
} finally {
BNYMellon Technology
IN
Thanks Eric Osman .. for your response.
I did change "ShowDesktop" Step 5 Pre-Condition as suggested. But redirectandrun, last step doesnt have any code you highlighted. so Didnot touch any. Below is the code from the last step of "redirectandrun" activity
String sPagesToCopy = tools.getParamValue("PagesToCopy");
String sAccessGroupName = tools.getParamValue("AccessGroupName");
String sSwitchOnlyIfExists = tools.getParamValue("SwitchOnlyIfExists");
boolean threadExists = false;
String currentThreadName = tools.getThread().getName();
String appName = null;
int appNameIndex = -1;
//This fix was provided as part of HFix-5399 for 6.2sp1 and ported to 7.1 along with the Hfix-5535 for Implicit privileges
String sThreadName = StringUtils.crossScriptingFilter( tools.getParamValue("ThreadName")); // BUG-55902 : Fix XSS vulnerability
Thanks Eric Osman .. for your response.
I did change "ShowDesktop" Step 5 Pre-Condition as suggested. But redirectandrun, last step doesnt have any code you highlighted. so Didnot touch any. Below is the code from the last step of "redirectandrun" activity
String sPagesToCopy = tools.getParamValue("PagesToCopy");
String sAccessGroupName = tools.getParamValue("AccessGroupName");
String sSwitchOnlyIfExists = tools.getParamValue("SwitchOnlyIfExists");
boolean threadExists = false;
String currentThreadName = tools.getThread().getName();
String appName = null;
int appNameIndex = -1;
//This fix was provided as part of HFix-5399 for 6.2sp1 and ported to 7.1 along with the Hfix-5535 for Implicit privileges
String sThreadName = StringUtils.crossScriptingFilter( tools.getParamValue("ThreadName")); // BUG-55902 : Fix XSS vulnerability
if (currentThreadName != null && (appNameIndex = currentThreadName.indexOf("/$")) > 0) {
appName = currentThreadName.substring(0, appNameIndex);
// BUG-135441: This case is failing for IAC since the request sent has the appName in the sThreadName
if((sThreadName != null) && (!(sThreadName.indexOf(appName) >= 0))) { // BUG-133682
// If there's an appname in the thread name, retain same form
sThreadName = appName + "/$" + sThreadName;
}
}
String sLocation = tools.getParamValue("Location");
boolean bAllowAccess = tools.getParameterPage().getAsBoolean("bAllowAccess");
PRThread sCurrentThread = tools.getThread();
String sCurrentThreadName = sCurrentThread.getName();
String sCurrentAccessGroupName = sCurrentThread.getThreadPage().getString("pxCurrentAccessGroup");
if("true".equalsIgnoreCase(sSwitchOnlyIfExists)){ // Will only be true for the refresh requests from clipboard tool
java.util.Set NameSet = tools.getRequestor().getThreadNames();
java.util.Iterator nameIter = NameSet.iterator();
String threadName = "";
while (nameIter.hasNext()){
threadName = (String) nameIter.next();
if (threadName.equals(sThreadName)) {
threadExists = true;
break;
}
}
if(!threadExists)
sThreadName=sCurrentThreadName;
}
if(sThreadName.equalsIgnoreCase("_new"))
{
sThreadName = pega.getUniqueThreadName();
}
String sOutsidePortlet = tools.getParamValue("pyOutsidePortlet");
if (sOutsidePortlet != null && sOutsidePortlet.equals("true")) {
sLocation = sLocation + "&pyOutsidePortlet=true";
unencodedLocation = unencodedLocation + "&pyOutsidePortlet=true";
}
boolean bPreserveAccessGroup = tools.getParameterPage().getAsBoolean("PreserveAccessGroup");
if (((sAccessGroupName == null) || (sAccessGroupName.equals(""))) && ((sThreadName != null) && (!sThreadName.equals("")))) {
if (bPreserveAccessGroup) {
PRThread prtRef = tools.getRequestor().getThread(sThreadName);
if (prtRef != null) {
sAccessGroupName = prtRef.getThreadPage().getString("pxCurrentAccessGroup");
}
}
}
if ((((sThreadName == null) || (sThreadName.equals(""))) && (currentThreadName.equals("Developer"))) ||
((sThreadName != null) && (sThreadName.equals("Developer")))) {
// Change standard to the same access group
PRThread prtRef = tools.getThread().getRequestor().getThread("STANDARD");
if (prtRef != null) { // make sure it hasn't been timed out...
try {
((com.pega.pegarules.priv.authorization.PegaAuthorization)prtRef.getAuthorization()).setActiveAccessGroup(prtRef, sAccessGroupName,bAllowAccess);
} catch (InvalidLocaleException ilEx) {
throw new PRRuntimeException("Encountered locale error configuring Standard Thread", ilEx);
} catch (BadRulesetException brsEx) {
throw new PRRuntimeException("Encountered invalid ruleset configuring Standard Thread", brsEx);
} catch (InvalidConfigurationException icEx) {
throw new PRRuntimeException("Encountered bad configuration when setting Standard Thread", icEx);
}
}
}
String [] sPageArray =null;
java.util.Vector vExistingNames = new java.util.Vector();
if(!sPagesToCopy.equals("")) {
String [] sRequestedNames = sPagesToCopy.split(",");
for (int i=0; i < sRequestedNames.length; i++){
if (tools.findPage(sRequestedNames[i], true) != null) {
vExistingNames.add(sRequestedNames[i]);
}
}
sPageArray = new String [vExistingNames.size()];
for (int j = 0; j < vExistingNames.size(); j++) {
sPageArray[j] = (String) vExistingNames.get(j);
}
}
if(sCurrentAccessGroupName.equals(sAccessGroupName) || "".equals(sAccessGroupName)){
String dispatchActivity = "pyDispatchActivity=true" ;
String dispatchStream = "pyDispatchStream=true" ;
String location = "" ;
if(!"".equals(unencodedLocation)){
location = unencodedLocation ;
// pega.setResponseThread(sThreadName,unencodedLocation,sPageArray);
}else{
location = sLocation ;
//pega.setResponseThread(sThreadName,sLocation,sPageArray);
}
if(unencodedLocation.contains("pyActivity")){
location = location +"&"+ dispatchActivity ;
}
else if(unencodedLocation.contains("pyStream")){
location = location +"&"+ dispatchStream ;
}
pega.setResponseThread(sThreadName,location,sPageArray);
}
else {
if (vExistingNames.size() > 0) {
pega.sendHTTPRedirect(sAccessGroupName, sThreadName, sLocation, sPageArray);
}
else {
pega.sendHTTPRedirect(sAccessGroupName, sThreadName, sLocation);
}
// BUG-120546, 122298, https://mesh.pega.com/message/89451#89451 for cleanup
// BUG-129096 for no cleanup on open assignment
String strAction = tools.getParamValue("action");
if (! ("openAssignment".equals(strAction) || "openWorkItem".equals(strAction) || "openWorkByHandle".equals(strAction) ))
((com.pega.pegarules.priv.context.PegaRequestor)tools.getRequestor()).cleanUpAllThreads();
}
Pegasystems
US
Take a look at the bit at the end of RedirectAndRun where cleanUpAllThreads is called. How well does your java code match what I posted? /Eric
BNYMellon Technology
IN
The one you asked us to change has "displayOnPage".equals(strAction) || "switchApplication".equals(strAction) ... but our Java code doesnt have this.
Our strAction is based on String strAction = tools.getParamValue("action"); but what you had shown is String loc = tools.getParamValue("Location");
Apologize if Im missing to read these codes as I dont know Java ....
Pegasystems
US
It looks like the code is using both the "loc" and the "strAction" variables.
If you can match up the logic of yours with the logic of my original code, then make the change and give it a try.
If you are not able to get a solution, and you believe you are having an issue with a defect in the Pega product that you would like assistance on, please put in an SR.
NOTE: One way to demonstrate whether the issue is a defect in the Pega product as opposed to an issue with your custom code is to find an example using out-of-box components that illustrates the issue.
For instance, if your issue is with switch-application, try using one of the out-of-box portal rules that includes a "change access group" or "switch application" menu item, and see if you can demonstrate wrong behavior. /Eric
BNYMellon Technology
IN
Sure will try. Can you paste the full Jave code of the last step in "redirectandrun" activity? It will help me understand the code and make changes accordingly .....
Pegasystems
US
Here's the java code for the last line of RedirectandRun version 7-10-16 as produced by HFIX-23690. /Eric
String sPagesToCopy = tools.getParamValue("PagesToCopy");
String sAccessGroupName = tools.getParamValue("AccessGroupName");
String sSwitchOnlyIfExists = tools.getParamValue("SwitchOnlyIfExists");
boolean threadExists = false;
String currentThreadName = tools.getThread().getName();
String appName = null;
int appNameIndex = -1;
//This fix was provided as part of HFix-5399 for 6.2sp1 and ported to 7.1 along with the Hfix-5535 for Implicit privileges
String sThreadName = StringUtils.crossScriptingFilter( tools.getParamValue("ThreadName")); // BUG-55902 : Fix XSS vulnerability
Here's the java code for the last line of RedirectandRun version 7-10-16 as produced by HFIX-23690. /Eric
String sPagesToCopy = tools.getParamValue("PagesToCopy");
String sAccessGroupName = tools.getParamValue("AccessGroupName");
String sSwitchOnlyIfExists = tools.getParamValue("SwitchOnlyIfExists");
boolean threadExists = false;
String currentThreadName = tools.getThread().getName();
String appName = null;
int appNameIndex = -1;
//This fix was provided as part of HFix-5399 for 6.2sp1 and ported to 7.1 along with the Hfix-5535 for Implicit privileges
String sThreadName = StringUtils.crossScriptingFilter( tools.getParamValue("ThreadName")); // BUG-55902 : Fix XSS vulnerability
if (currentThreadName != null && (appNameIndex = currentThreadName.indexOf("/$")) > 0) {
appName = currentThreadName.substring(0, appNameIndex);
// BUG-135441: This case is failing for IAC since the request sent has the appName in the sThreadName
if((sThreadName != null) && !sThreadName.equals("") && (!(sThreadName.indexOf(appName) >= 0))) { // BUG-133682
// If there's an appname in the thread name, retain same form
sThreadName = appName + "/$" + sThreadName;
}
}
String sLocation = tools.getParamValue("Location");
boolean bAllowAccess = tools.getParameterPage().getAsBoolean("bAllowAccess");
PRThread sCurrentThread = tools.getThread();
String sCurrentThreadName = sCurrentThread.getName();
String sCurrentAccessGroupName = sCurrentThread.getThreadPage().getString("pxCurrentAccessGroup");
if("true".equalsIgnoreCase(sSwitchOnlyIfExists)){ // Will only be true for the refresh requests from clipboard tool
java.util.Set NameSet = tools.getRequestor().getThreadNames();
java.util.Iterator nameIter = NameSet.iterator();
String threadName = "";
while (nameIter.hasNext()){
threadName = (String) nameIter.next();
if (threadName.equals(sThreadName)) {
threadExists = true;
break;
}
}
if(!threadExists)
sThreadName=sCurrentThreadName;
}
if(sThreadName.equalsIgnoreCase("_new"))
{
sThreadName = pega.getUniqueThreadName();
}
String sOutsidePortlet = tools.getParamValue("pyOutsidePortlet");
if (sOutsidePortlet != null && sOutsidePortlet.equals("true")) {
sLocation = sLocation + "&pyOutsidePortlet=true";
unencodedLocation = unencodedLocation + "&pyOutsidePortlet=true";
}
boolean bPreserveAccessGroup = tools.getParameterPage().getAsBoolean("PreserveAccessGroup");
if (((sAccessGroupName == null) || (sAccessGroupName.equals(""))) && ((sThreadName != null) && (!sThreadName.equals("")))) {
if (bPreserveAccessGroup) {
PRThread prtRef = tools.getRequestor().getThread(sThreadName);
if (prtRef != null) {
sAccessGroupName = prtRef.getThreadPage().getString("pxCurrentAccessGroup");
}
}
}
if ((((sThreadName == null) || (sThreadName.equals(""))) && (currentThreadName.equals("Developer"))) ||
((sThreadName != null) && (sThreadName.equals("Developer")))) {
// Change standard to the same access group
PRThread prtRef = tools.getThread().getRequestor().getThread("STANDARD");
if (prtRef != null) { // make sure it hasn't been timed out...
try {
((com.pega.pegarules.priv.authorization.PegaAuthorization)prtRef.getAuthorization()).setActiveAccessGroup(prtRef, sAccessGroupName,bAllowAccess);
} catch (InvalidLocaleException ilEx) {
throw new PRRuntimeException("Encountered locale error configuring Standard Thread", ilEx);
} catch (BadRulesetException brsEx) {
throw new PRRuntimeException("Encountered invalid ruleset configuring Standard Thread", brsEx);
} catch (InvalidConfigurationException icEx) {
throw new PRRuntimeException("Encountered bad configuration when setting Standard Thread", icEx);
}
}
}
String [] sPageArray =null;
java.util.Vector vExistingNames = new java.util.Vector();
if(!sPagesToCopy.equals("")) {
String [] sRequestedNames = sPagesToCopy.split(",");
for (int i=0; i < sRequestedNames.length; i++){
if (tools.findPage(sRequestedNames[i], true) != null) {
vExistingNames.add(sRequestedNames[i]);
}
}
sPageArray = new String [vExistingNames.size()];
for (int j = 0; j < vExistingNames.size(); j++) {
sPageArray[j] = (String) vExistingNames.get(j);
}
}
if(sCurrentAccessGroupName.equals(sAccessGroupName) || "".equals(sAccessGroupName)){
String dispatchActivity = "pyDispatchActivity=true" ;
String dispatchStream = "pyDispatchStream=true" ;
String location = "" ;
if(!"".equals(unencodedLocation)){
location = unencodedLocation ;
// pega.setResponseThread(sThreadName,unencodedLocation,sPageArray);
}else{
location = sLocation ;
//pega.setResponseThread(sThreadName,sLocation,sPageArray);
}
if(unencodedLocation.contains("pyActivity")){
location = location +"&"+ dispatchActivity ;
}
else if(unencodedLocation.contains("pyStream")){
location = location +"&"+ dispatchStream ;
}
pega.setResponseThread(sThreadName,location,sPageArray);
}
else {
String harnessID = pega.getTamperingUtils().createToken();
sLocation = sLocation.replaceFirst("(&pzHarnessID=)\\w+", "$1" + harnessID);
if (vExistingNames.size() > 0) {
pega.sendHTTPRedirect(sAccessGroupName, sThreadName, sLocation, sPageArray);
}
else {
pega.sendHTTPRedirect(sAccessGroupName, sThreadName, sLocation);
}
// BUG-120546, 122298, https://mesh.pega.com/message/89451#89451 for cleanup
// BUG-129096 for no cleanup on open assignment
// BUG-169705 for no cleanup on displayOnPage
String strAction = tools.getParamValue("action");
/*HFix-23041 : Not calling cleanUpAllThreads API if it is switchApplication or switchPortal Call.*/
String loc = tools.getParamValue("Location");
if(loc.contains("ShowDesktop")){strAction = "switchApplication";}
if (! ("openAssignment".equals(strAction) || "openWorkItem".equals(strAction) || "openWorkByHandle".equals(strAction) || "displayOnPage".equals(strAction) || "switchApplication".equals(strAction)))
((com.pega.pegarules.priv.context.PegaRequestor)tools.getRequestor()).cleanUpAllThreads();
}
BNYMellon Technology
IN
I get below error when I tried to save .... Eric Osman
I get below error when I tried to save .... Eric Osman
1. ERROR in Rule_Obj_Activity__baseclass_RedirectAndRun_Action_20160506T112142_362_GMT.java (at line 714)
String harnessID = pega.getTamperingUtils().createToken();
^^^^^^^^^^^^^^^^^
The method getTamperingUtils() is undefined for the type PegaAPI
----------
1 problem (1 error)
BNYMellon Technology
IN
Hi
Can some one help me to correct above error?
Thanks
Arvind B
Pegasystems Inc.
US
Arvind,
The HFixes Eric mentioned were from Pega 7.1.7, if you are on Pega 7.1.5, my guess is that the method getTamperingUtils() didn't get added until Pega 7.1.6 or later. If that line of code isn't critical, you could surgically remove it, but it's clear that just dropping the java from a hot fix two versions later won't work. You'll need to understand the java and make changes. Before going too far down this path, I might suggest breaking the pieces down. Can you get the link to refresh your entire harness via showHarness? If not, that might be the place to start. Once you can show the harness, then work on switching the application. You noticed some pages were updated OOTB that aren't here, I don't know the guts of the OOTB process well enough to know why that might be, but perhaps you'll need to make edits to that data yourself. Also, I feel it's worth pointing out how outside the guardrails you are going with this process. Ultimately, what is the business problem you are trying to solve? Perhaps if we refocused the conversation on a guardrails compliant way to solve that problem, you might have more success.
Thanks,
Mike
BNYMellon Technology
IN
Hi Mike
Refreshing the harness via Show-Harness did not resolve the issue. Its not repainting the entire harness.
Outside the guardrails the user will get the case id, he/she has to manually switch the Application to work on it. Below is our business requirement ..
We have two applications App1 and App2.
App1 can instantiate a case in App2 at a particular stage. App2 can be worked stand alone too. When a case in App2 is created via App1, the case appears as a link in App1 and the user has to simply click the link to work on the case. When the user clicks the link the application has to switch dynamically to App2 so that User can work seamlessly ...
BNYMellon Technology
IN
Hi
Inputs from anyone is welcome here. I am bit caught up on production issues so will be working more on this in coming week
Thanks
Arvind B
Pegasystems
US
>>> has to simply click the link to work on the case. When the user clicks the link the application has to switch dynamically to App2 so that User can work seamlessly ...
I would think the easiest way to provide for this is to make sure you include both app's rulesets in your profile. /Eric
Highmark Health Solutions INC
US
Hi Eric, I do see this issue in Pega 7.1.8. do we have any hotfix available for the same in Pega 7.1.8.
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.
-
Kebisha Bright