Question
Murex
LB
Last activity: 22 Aug 2016 4:02 EDT
Problem Opening a Portal From Link
Hello all,
I was trying to implement accelerators (opening the portal and displaying an object directly via navigating to a URL) on one of our Pega objects. I tried following the instructions in this article:
https://pdn.pega.com/how-create-process-opens-portal-assignment-link
However, after creating the ShowAssignmentInPortal activity in baseclass, creating the section containing the JS snippet and then adding that section to the portal, when I try to use a the url to access the object directly, I get the following error:
The error seems to be due to authentication or the lack of it. I double checked the privileges of my user and they are all in check (administrator privileges). I also tried unticking the "Require Authentication To Run" check box in the ShowAssignmentInPortal activity's security tab, but with no success either.
Does any body have any suggestions as to what might be happening and how to fix it?
Thanks,
Joe
-
Like (0)
Advaitaa Biswas -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Murex
LB
Any thoughts on the above?
Pegasystems
US
Pegasystems Inc.
US
ShowAssignmentPortal is a sample activity required to produce the desired results. It is not shipped out of the box but the Support Article provides the example.
Murex
LB
Hey Eric,
Thank you for your reply.
I actually had to create the activity ShowAssignmentInPortal. I followed the steps mentioned in that article but I'll post a screenshot anyway once I'm back in the office.
Cheers!
Murex
LB
PEG
US
Since it appears as if you are at least trying to render the code in that section, I would see if I could add some code that will output the pxRequestor page.pxAccessGroups (and possibly other pages). You are probably not running with the access group you think, or some other security info is incorrect.
If you can figure out how to run the Tracer for this, that might make things much easier. Not sure how to do that.
Murex
LB
Hey Ron,
I did run the tracer for that.I got an error message that was the same as the one embedded into the above supplied xml. I'll re-run when I'm back in the office and try to post some screenshot here.
Regarding your other suggestion, I'd ask whether adding any form to output the access group would work? I mean even if I were to add a label that displays the value of that property, execution doesn't even seem to be hitting that point is it? I'll give it a go anyway maybe it would help.
I'm 100% percent sure the privileges are in order as I'm constantly having to use them so I don't really think it has anything to do with my user.
Thank you for your input Ron
Murex
LB
Pegasystems Inc.
US
Hi Joe,
What version of Pega/PRPC are you using?
What is the link you used to get to this point? Please X out any proprietary information in the link.
As Ron stated, figuring out how to Trace this issue would be helpful in debugging the issue. If you just execute the ShowAssignmentPortal activity do you see the same results?
Murex
LB
Hey Kip,
We're on 7.1.7.
Regarding the link, I appended "/?pyActivity=ShowAssignmentInPortal&AssignmentHandle=XXX" (with XXX being the pzInsKey of the object I'm attempting to open) to the link to our pega development environment. Could it be something to do with that? I didn't consider that possibility because the error generated seems to show that the activity is indeed being detected but is not being allowed to execute.
Thank you for your help!
Joe
Pegasystems Inc.
US
Hi Joe,
When you get back to the office, please test just by executing the activity. If required turn on Tracer and hopefully that will shed some light as to what is going on. Please post an update with the results of your test so we can help you out.
Murex
LB
Hi Kip,
Sorry for the late reply.
I tried running the activity and your absolutely right, it's crashing.
I get the following error message:
"Failed to find a 'RULE-OBJ-ACTIVITY' with the name 'VALIDPORTALCHECK' that applies to '@baseclass'. There were 2 rules with this name in the rulebase, but none matched this request. The 2 rules named 'VALIDPORTALCHECK' defined in the rulebase are: 2 related to applies-to class '@baseclass', but were defined on subclasses: 'Data-Portal'.Operator IDjabisleimanRequestor IDH3B2CD8DA97FAA67A2DAC013DDC37FEDA"
This is a screenshot of the tracer:
This had me thinking the error is due to "VALIDPORTALCHECK" being present in a different RuleSet. So I Saved As in the same rule set and ran the activity. It ran, and it rendered, but not properly. There were grayed out areas. Additionally, my main Designer Studio window disappeared and was replaced by the incompletely rendered window.
I'll also add that I tried to navigate through the URL directly after doing this fix, and I was still faced with the same error.
Thanks,
Joe
Pegasystems Inc.
IN
Hi Joe, Good morning!
>>> I appended "/?pyActivity=ShowAssignmentInPortal&AssignmentHandle=XXX" (with XXX being the pzInsKey of the object I'm attempting to open)
- could we quick test with assignment pzInskey instead of workobject pzInskey for XXX?
Please share your observations/comments, Thank you!
psahukaru
Murex
LB
Updated: 8 Mar 2016 6:24 EST
Murex
LB
Update:
Hello guys,
After a suggestion from Frank Apap I checked the ability for the activity to be able to be invoked from the client directly and I was able to overcome that error:
On the other hand, I am now faced with an issue where the work object I'm trying to open is being opened in a pop-up window rather than in the main window, so I'm trying to solve that now and would appreciate your input as always.
Thanks,
Joe
-
Jason Knighten
Pegasystems Inc.
US
Glad that helped. As for your other question, can I clarify what you are trying to do a little further?
Is the situation that you already have a Pega7 session open in the browser and you are clicking this link in another window and tab and want the work object to open in the already open Pega7 session? If not, can you elaborate on the state of the browser, how you are executing the link (cut and and paste into browser bar vs. href vs. JavaScript)?
Thanks!
Murex
LB
Hey Frank,
Again thanks for your help.
I am simply copy pasting the link into the browser. I do have Designer Studio open up in the browser as well. But when I say the object is rendering in a pop-up, I mean the following:
So this is the link I am using:
And when I navigate to it, the main portal opens:
And then a pop up opens as well with the actual data:
So both windows are there.
Hey Frank,
Again thanks for your help.
I am simply copy pasting the link into the browser. I do have Designer Studio open up in the browser as well. But when I say the object is rendering in a pop-up, I mean the following:
So this is the link I am using:
And when I navigate to it, the main portal opens:
And then a pop up opens as well with the actual data:
So both windows are there.
What is more, if I go back to my Designer Studio, it refreshes and displays the same 2 windows above. Even if I close the browser and then go to the Dev environment, I get those windows instead of the Designer Studio (which I can only get back to after clearing my cache). What I've also noticed as well is that the functionalities in the left pane of the main window no longer work.
Thank you for your help Frank!
Joe
PEG
US
Copy/pasting a link from the address bar on the Browser is a bad idea and can lead to undesirable and unexpected actions. A typical bad result would be if the original URL contained a pzTransactionID which has become stale. Or, the scripts which are needed to post-process the content after it loads are no longer present. Or many other issues.
You should find some other way to do this.
Pegasystems Inc.
US
Can you cut and paste your CallOpenAssignment section (the one with the JS code) and also show which section is including it? That may help explain the behavior.
Pegasystems Inc.
US
on step #4 of the document you need to use the WorkArea gadget - you are likely using a dynamic container - open the section called UserCenterPanel in Pega-Pro-Com:07-10-01 - do not use the one in the other ruleset. When you open this section is should look the same as the screenshot on step #4 of the document
Murex
LB
Hey Richard,
Thanks for your reply.
I'm not sure I understood you properly. I added the CallOpenAssignment section to a custom section we've built, so I didn't even use the UserCenterPanelOpenAssignment that was referenced in step 4 of the document. Should I be? Is that something I missed?
Let me know if I answered your question otherwise I'll supply additional details.
Thank you for your help!
Joe
Pegasystems Inc.
US
the section in the main content of the portal is not using a work area - open the section called UserCenterPanel in Pega-Pro-Com:07-10-01 - copy and paste the layout with the workarea in your section - remove the DC and layout that you have - to get this to work, it is important to follow step #4 accurately (for example the section include with the JS should be placed AFTER the work area)_
Murex
LB
Murex
LB
Hey Frank,
This is the CallOpenAssignment section:
<a><script>
var assignmentHandle = "<p:r n='pxRequestor.AssignmentHandle'/>";
if (assignmentHandle && assignmentHandle.length>1){
window.setTimeout("openWorkByHandle(assignmentHandle)", 1000);
}
</script></a>
As for the section including it:
This is the harness of the portal I am referencing in the pxThread.pxPortal (it's not the same as the one in the screenshot above).
I added the CallOpenAssignment to the section selected above (I did so by opening that section and adding the CallOpenAssingment below the existing element - see below screenshot):
I hope this sheds more light as to what may be going on/what I am doing wrong!
Thanks,
Joe
Murex
LB
Pegasystems Inc.
US
Hi Joe,
A few things:
1) The most important thing is to find the ruleset/version of UserCenterPanel that is currently being displayed. You can do that with tracer or the UI inspector (if it is available on your version).
2) If it hasn't been customized then the LP Integration one you showed should be fine. Either way you are going to be copying it into your ruleset so it will take precedence as long as the class is Data-Portal.
When it comes to these sections Richard Marsot is much more of an expert than I on this. If he has any additional advice take it over mine :-)
Thanks
Frank
Pegasystems Inc.
US
Murex
LB
Hello Richard,
Back in office after Easter vacation; as ever, thanks for your reply and looking forward to hearing your input after the below update:
After following your instruction, I managed to find the UserCenterPanel in the ProCom ruleset. I am however confused as to where I should copy-paste it. Please find below a series of screenshots that might help clarify my case:
1) This is the ShowAssignmentInPortal activity:
2) This is the portal referenced in the activity:
3) This is the SFAPortalWorkSpace harness that is referenced in the above portal:
Hello Richard,
Back in office after Easter vacation; as ever, thanks for your reply and looking forward to hearing your input after the below update:
After following your instruction, I managed to find the UserCenterPanel in the ProCom ruleset. I am however confused as to where I should copy-paste it. Please find below a series of screenshots that might help clarify my case:
1) This is the ShowAssignmentInPortal activity:
2) This is the portal referenced in the activity:
3) This is the SFAPortalWorkSpace harness that is referenced in the above portal:
From this stage, and before trying to copy paste from the UserCenterPanel (because I wasn't sure what to copy and where to paste), I tried 2 things:
3.1) The first of which was to change the screen layout from Header Left to Header Footer Left and then add the CallOpenAssignment section to the footer of that screen layout (because the screen layout would not allow me to add the section at the bottom: it would only allow me to replace the section in the work area and I believe that was what was causing the object to open in a pop up).
So this is the CallOpenAssignment section in the footer:
This resulted in the portal to render incorrectly when I tried navigating to the object via direct access:
Notice the header is messed up. Even when I try to access the portal by launching from designer studio. the header is messed up:
Old header:
New corrupted header:
3.2) The second approach was to open the section in the main work area and add then add the CallOpenAssignment section to that section:
This is the harness with the main work area properties:
This is the section referenced by the main work area:
This is the section after I modified it by adding the CallOpenAssignment section to it:
So these are the 2 approaches I've tried. I'm not sure which is the correct way, but both of them still don't work as desired.
Now there is something additional that I've noticed (in both approaches). If from designer studio I launch the portal and then enter the link, it renders in accordance with the standalone portal. What I mean is the following: in the first approach, I mentioned that the portal in itself had changed (the header had gone black). If I launch the portal from designer studio (no direct web access), it launches with the black header. If I proceed to entering the link and navigating to it, I will get the portal with the black header but with everything else correct (see below):
Now, if I do NOT launch the portal from designer studio but use the link directly instead everything gets messed up:
As for the second approach, if I again launch the portal from Designer Studio and then navigate to the link, everything works correctly (this is the behavior that we are trying to implement):
If I use the link directly, again, everything gets messed up:
It seems to me that when the portal is launched from the DS there is something additional that is getting called that the direct web access is not implementing.
Additionally, in both approaches, whenever I go to the link (http://XYZ/prweb/?pyActivity=ShowAssignmentInPortal&AssignmentHandle=MX-MXSFA-WORK-OPPORTUNITY OPP5562 with XYZ being the url of the environment), and then go back to designer studio, the DS refreshed and shows me the portal with the work object open.
Does this have to do with your former suggestion Richard? Or is this a different problem?
I'm sorry for the long post but this has been giving us grief for quite a while now.
@ Frank if you have anything to weigh in I would extremely appreciate it as well!
Thank you both for your continued help
Joe
Pegasystems Inc.
JP
Hi Joe,
Have you found a solution for this issue?
If yes, could you share your solution by updating this discussion thread?
If not, have you raised any SR to get help from product team?
Chunzhi