cancel
Showing results for 
Search instead for 
Did you mean: 

Clarification regarding Rules for assigning portal desktop in EP

saurabh_vakil
Active Contributor
0 Kudos
92

Dear Experts,

I am having the following rules defined within the Master Rule Collection, one assigned according to the User and another one according to the assigned Role:

IF User = user1

     THEN Portal Desktop = portaldesktop1

IF Role = role1

     THEN Portal Desktop = portaldesktop2

Now the user1 user has the portal role role1 assigned. In this case, which portal desktop will get assigned to the user? Portaldesktop1 or portaldesktop2?

I want to know whether the first rule will take precedence or the second one will take precedence?

Regards,

Saurabh

Accepted Solutions (1)

Accepted Solutions (1)

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

The IF statements of Master Rule Collection are in fact IF-ELSEIF statements.

That means whichever is the First IF condition satisfied, that portal desktop would be assigned. The sequence of execution is from Top to Bottom, once a condition is satisfied the remaining IFs are not checked.

In your case the first IF will take precedence and user will be assigned Portal Desktop 1.

In SAP's words,

"Conditions are prioritized according to their top-to-bottom order of appearance in the rule collection. If a user fits more than one condition, then the first condition that is true for that user, determines which portal desktop is displayed. "

Below are help links for you.

http://help.sap.com/saphelp_nw04/helpdata/en/4b/29cf122f414721964269e1b675d62c/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/95/92b2f7d2f14a6da7a8b5d66808d1f6/content.htm

Best way is to do this in Portal and check the results.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

Thanks a lot for your prompt response.

In my case, there was already a rule existing for the role as,

IF Role = role1

     THEN Portal Desktop = portaldesktop2

I then created a new rule for the user as:

IF User = user1

     THEN Portal Desktop = portaldesktop1

And as I stated earlier, user1 has the portal role role1 assigned to him.

Now in the Rule Collection the rule defined to the user id appears first, but yet the desktop that I am assigning in the rule (i.e. portaldesktop1) is not getting assigned to user1. When I login to the portal as user1, I am still seeing the older desktop. I even cleared the Navigation Cache, but to no avail.

Can you help me in finding out what can be the issue here?

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

Check on following items.

1. Ensure rule changes are properly saved.

2. Also the Desktop PCD paths are correctly given.

3. Try giving User ID in all CAPs.

4. Ensure Permissions are there on the desktop for that User.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

I have checked all the above mentioned points.

1. After changing the rule I am saving it properly.

2. The portal desktop pcd path is correctly specified in the rule.

3. I gave the User ID in all capital letters in the rule.

4. The desktop had Read permission for Everyone group.

Still the desktop is not getting assigned to the user.

Is there anything more that I can check to make this work?

Thanks & Regards,

Saurabh

saurabh_vakil
Active Contributor
0 Kudos

Hi,

I have also noticed that when I am writing a rule for a Role and assigning a portal desktop, the changes are reflecting properly.

But when I modify this rule and write the rule for any specific User and assign a different portal desktop, the changes is not reflecting.

Any suggestions what can be the issue?

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

Is it like you are modifying the same Rule to have condition on User ID and then portal desktop as the new one?

If so, i again suggest to ensure changes are saved properly.

And ensure  that  the desktop rule for the user XXXX comes first than any other rule invloving the same user.

Once changes are saved, clear navigation cache, log off from portal, clear browser cache, close the browser and login back with fresh browser.

Also once try by removing exising Rule on Role and then newly adding Rule for User Id.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

Thanks for your inputs. I am having a single rule in the Rule Collection on the condition on User ID. I have put this rule as the first rule in the rule collection. Also I have removed the rule on the condition on role.

I am ensuring that on making these changes I am saving the changes and clearing Navigation cache, clearing browser cookies, opening a new browser window and then logging in to the portal.

However even after doing these steps the assigned portal desktop is not getting reflected for the User ID.

To summarize,

Initially I had the rule as:

IF Role = role1

     THEN Portal Desktop = portaldesktop2

This was the first rule in Master Rule Collection. Here, since the user was having role1 assigned, the portaldesktop2was reflecting on logging in to the portal.

Then I removed this rule and added this:

IF User = user1

     THEN Portal Desktop = portaldesktop1

Now this was my first rule in the Master Rule Collection. On saving the changes and clearing caches (both server and client level browser caches) and opening a new browser session. I logged in to the portal again. But portaldesktop1 was not reflecting for the user now.

Hope I am clearly explaining the problem I am facing.

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

Yes, you are clearly explaining the problem faced. But am surprised how come this is still not reflecting!

1) May I ask a silly question, is the new desktop "portal desktop1" having the new theme & framework page selected as default within? And the theme & framework page are not same as Portal Desktop 2?

2) And as per standard SAP help, there should always be below default rule at the end of all rules in the rule collection to ensure the defualt desktop is picked up when none of the top ones apply.

Suggest you to also put this one.

3) I hope the READ permissions are there with End-User access on the Desktop1, its default framework page, its default theme inside.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

Thanks again for your response.

1) Thats a valid question, not at all silly. To answer this, yes the framework pages and themes in the desktops portaldesktop1 and portaldesktop2 are different, not the same.

2) The default rule IF User=* then Portal Desktop = defaultdesktop is present at the end of the Master Rule Collection.

3) The user has End-user Read permission with End-user access on the desktop1, the framework page within this desktop and also the theme.

With all these things in place, it is really perplexing why the desktop assignment to the user is still not working.

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

Can you try using the new Desktop "Portal Desktop1" in the ROLE condition (remove the user condition IF - THEN) and see if the new desktop is getting picked up for Role condition it self?

Also now we should be checking NWA Logs to see if there are any exceptions captured for Portal display rule processing in background.

Let me know.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

I tried adding the role in the IF...THEN condition in the rule and removing the rule having the condition for user. This way the desktop1 was getting properly assigned and reflecting for the user.

I will try again to add the user in the rule and check if I am getting any entries in the logs and update you. Thanks for your support.

Thanks & Regards,

Saurabh

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

Once again I removed the ROLE condition and written only the USER condition in the rule and assigned portaldesktop1 to user1. Then I logged into the portal with user1, but the desktop1 was not reflecting.

I checked the NWA logs, but I did not see any errors with respect to this.

Once again to summarize, ROLE condition is working in the Rule collection but USER condition is not working.

Thanks & Regards.

Saurabh

Former Member
0 Kudos

Hi Saurabh,

When you are using rule collection with IF statement User, it would be not working of because of case sensitive issue of user id?

Mahesh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

Can you copy paste the IF..THEN Condition statement (hoping it doesnt have any client sensitive information), wanna check the values used.

Also pls consider what Mahesh mentioned above, give User ID in the same Case as it is in UME & try.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

Following is the condition I have written in the rule:

IF User = ZSTESTUSER

     THEN Portal Desktop = pcd:portal_content/......../portaldesktop1

In the UME the User ID is exactly as I have mentioned in the above condition, i.e. ZSTESTUSER

And also I have removed the condition for ROLE from the rule collection.

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Suarabh,

1) Just now got another very silly doubt (can be a true silly one this time!).

You mentioned the desktop1 has Read & End User permission for Everyone Group.

Check if the ZSTESTUSER is assigned to this Everyone Group.

2) Try putting USER = * for Desktop1 rule and see if it's reflecting then.

3) Try adding the user ZSTESTUSER directly to the permissions of desktop1 and give it read and end user permissions.

4) Also check permissions are there for this user on the folders in the path where this object "desktop1" is located.

Thanks,

Swapna Priya.

Message was edited by: Swapna Priya Neemkar

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

1) The user ZSTESTUSER is assigned to the Everyone group.

2) I will try putting the condition for USER = * and assigning the desktop1 and update you, once our development teams leave and no one will be using the system.

3) ZSTESTUSER already has Read permission with End-user access directly on the desktop portaldesktop1.

4) ZSTESTUSER also has Read permission on the folder within which this desktop is created.

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

Ensure the user ZSTESTUSER has no personalization done for Portal Theme.

And is this desktop1 getting assigned to any other User ID with User IF Statement?

If yes can we use some other working user id?

If no can we create a new portal desktop3 with same framework page and theme as portal desktop1 and then try assigning this new portal desktop3 to ZSTESTUSER (giving proper permissions to new desktop3)?

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

There is no personalization done in the portal for the user ZSTESTUSER. And the problem does not seem user-specific, as I have tried assigning the portaldesktop1 to some other User IDs also and it is not working for any of them.

I will try to create a new portal desktop and assign the framework page and theme and accordingly modify the rule and check if it is working. And I will update you.

Thanks for your inputs.

Regards,

Saurabh

dao_ha
Active Contributor
0 Kudos

Hi Saurabh,

What if you assign the user to the role instead of assigning the role to the user (while keeping the order of the Master Collection Rule as in your first post)?

Dao

Answers (2)

Answers (2)

saurabh_vakil
Active Contributor
0 Kudos

Hi All,

Due to some reason, after making change in the web.xml file and restarting the server, the file was getting reverted to the original version which was not having my custom portal alias defined. As a result of this the rule for URL Alias was not working.

But our Basis team once again made change in the web.xml file and restarted the server. After restarting server, we ensured that the web.xml file was having the entry for the portal alias portal/myalias and then the rule is found to be working properly.

Thanks & Regards,

Saurabh

hofmann
Active Contributor
0 Kudos

Hi,

after 20 posts the question has not moved into any direction. Before users have to guess how your rule and conf looks like, one of the nice things about the new SCN is that you can attach screenshots to your question. Can you please share some screenshots so we can see how your configuration looks like?

Thanks,

Tobias

saurabh_vakil
Active Contributor
0 Kudos

Dear Tobias,

Thanks, I overlooked this new feature.

Dear Priya/Mahesh,

I am attaching a screenshot of the Master Rule Collection. I am trying to assign the desktop to the User zstestuser which is highlighted in the image, but the assignment is not working.

When I am logging in to the portal with the ID zstestuser, I am not seeing the desktop that I am assigning in the rule.

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

The screenshot looks just fine. In fact in our Portals the User condition works irrespective of User ID (from local UME) being in Small or Cap case.

Did you try on below item as mentioned in last posts.

"I will try to create a new portal desktop and assign the framework page and theme and accordingly modify the rule and check if it is working. And I will update you"

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

I created a new framework page and portal desktop. Then I added a theme and the framework page to the new portal desktop and wrote the condition for USER in the rule collection and assigned the new desktop. After doing this I cleared navigation cache and logged in with that user. And this time the assigned desktop reflected for the user.

I am not totally sure what exactly was going wrong with my older portal desktop. But I will give an overview of what was done in the previous desktop and what I did in the new desktop.

Basically this whole exercise of creating new portal desktop was that we had made some customization in the standard masthead component. After making modifications we created a new Masthead iView from the masthead par file. Then I created a framework page (created a copy of Default Framework Page then changed its ID), removed the default Masthead iView and added my new masthead iView within this page. Then I used this frameworkpage within portaldesktop1. This desktop was not getting assigned after writing the USER condition in the rule collection.

This time again I created a new framework page and instead of removing the standard Masthead iView I just unchecked the Visible checkbox. I then added my custom masthead iView and added the framework page to the new portal desktop. Then I wrote a rule to assign this portal desktop using the USER condition, and this rule executed successfully and the desktop got assigned to the user.

Thanks Priya, Mahesh and Tobias for your inputs.

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

As a general practice here whenever we copy and modify any of the standard components viz., Masthead, DLN, TLN we include the new iViews out of these in the copied framework page, along with the standard iViews.

Then standard iViews are unchecked for visibility and new iViews are checked for visibility.

Good that your issue is resolved. All the best for further stuff.

Thanks,

Swapna Priya.

saurabh_vakil
Active Contributor
0 Kudos

Hi Priya,

Thanks, I will remember this in future when ever making changes to standard components.

Further to this, I require that I show a specific portal desktop depending upon the URL Alias of the portal.

I have added the alias portal/myalias to the web.xml file under the path /usr/sap/<SID>/<INSTANCE>/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/WEB-INF and then restarted the portal.

Then I am defining a rule for the condition URL Alias as in the below image. But again this desktop is not reflecting when I am accessing the portal using the alias http://<hostname>:<port>/irj/portal/myalias

Any ideas if I am missing anything to make this work?

Thanks & Regards,

Saurabh

swapnapriya_neemkar2
Active Participant
0 Kudos

Hi Saurabh,

The current thread has grown too long with such big trail of replies.

For benefit of all the forum users, i suggest you should post this other issue with Portal Rules as new thread and close this thread.

Thanks in advance.

Regards,

Swapna Priya.

hofmann
Active Contributor
0 Kudos

In fact in our Portals the User condition works irrespective of User ID (from local UME) being in Small or Cap case

I always put them in uppercase, with lowercase or mixed I get inconsistent results. But maybe that also depends on the actual patch level of the portal (and / or backend)

hofmann
Active Contributor
0 Kudos

Why close and open a new thread that will treat the exactly same problem from the same user? Makes no sense.

You can switch from threaded view to a more simple plain view of the answers.

hofmann
Active Contributor
0 Kudos

Just to rule this out: has any one of the rule you created already worked once? Just to know that the portal is really reading the master rule you are editing ...

The URL alias configuration in web.xml is a copy of another alias and looks like this:

<init-param>

<param-name> portal/youralias</param-name>

<param-value>anonymous=0,abc</param-value>

</init-param>

And is placed in the <servlet> part?

saurabh_vakil
Active Contributor
0 Kudos

Hi Tobias,

The portal is indeed reading the master rule collection correctly. When I modify the rule collection with the below rule, it immediately reflects.

IF Role = role1

     THEN Portal Desktop = portaldesktop1

Also the addition I have made in the web.xml file is a copy of another already defined alias and is placed within the <servlet> and </servlet> part.

This is what it looks like:

<servlet>

.......

     <init-param>

     <param-name>

      portal/myalias

    </param-name>

    <param-value>

       anonymous=0,proxy=0,low_bandwidth=1,include_in_url=1,include_application_name_in_url=1

    </param-value>

   </init-param>

........

</servlet>

Thanks & Regards,

Saurabh